summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/openssl/openssl-qoriq/perlpath.pl
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/openssl/openssl-qoriq/perlpath.pl')
-rwxr-xr-xrecipes-connectivity/openssl/openssl-qoriq/perlpath.pl35
1 files changed, 35 insertions, 0 deletions
diff --git a/recipes-connectivity/openssl/openssl-qoriq/perlpath.pl b/recipes-connectivity/openssl/openssl-qoriq/perlpath.pl
new file mode 100755
index 00000000..79d4a406
--- /dev/null
+++ b/recipes-connectivity/openssl/openssl-qoriq/perlpath.pl
@@ -0,0 +1,35 @@
1#!/media/data/fb/daaz/p2040/tmp/work/ppce500mc-qoriq-poky-linux/openssl-qoriq/1.0.2l-r0/recipe-sysroot-native/usr/bin/perl
2#
3# modify the '#!/usr/local/bin/perl'
4# line in all scripts that rely on perl.
5#
6
7require "find.pl";
8
9$#ARGV == 0 || print STDERR "usage: perlpath newpath (eg /usr/bin)\n";
10&find(".");
11
12sub wanted
13 {
14 return unless /\.pl$/ || /^[Cc]onfigur/;
15
16 open(IN,"<$_") || die "unable to open $dir/$_:$!\n";
17 @a=<IN>;
18 close(IN);
19
20 if (-d $ARGV[0]) {
21 $a[0]="#!$ARGV[0]/perl\n";
22 }
23 else {
24 $a[0]="#!$ARGV[0]\n";
25 }
26
27 # Playing it safe...
28 $new="$_.new";
29 open(OUT,">$new") || die "unable to open $dir/$new:$!\n";
30 print OUT @a;
31 close(OUT);
32
33 rename($new,$_) || die "unable to rename $dir/$new:$!\n";
34 chmod(0755,$_) || die "unable to chmod $dir/$new:$!\n";
35 }