summaryrefslogtreecommitdiffstats
path: root/util/perlpath.pl
diff options
context:
space:
mode:
authorRalf S. Engelschall <rse@openssl.org>1999-03-10 19:57:05 +0000
committerRalf S. Engelschall <rse@openssl.org>1999-03-10 19:57:05 +0000
commit7e37e72a3ddc3935cc88f6e20e89395f87bacd09 (patch)
treebaaf010bd9dae07771ad1a90b356dfbaa1615fc8 /util/perlpath.pl
parent637691e6b4d66c3c4cc6331ea4d4c2a2c4b79d70 (diff)
Be less restrictive and allow also `perl util/perlpath.pl /path/to/bin/perl'
in addition to `perl util/perlpath.pl /path/to/bin', because this way one can also use an interpreter named `perl5' (which is usually the name of Perl 5.xxx on platforms where an Perl 4.x is still installed as `perl'). Submitted by: Matthias Loepfe <Matthias.Loepfe@adnovum.ch> Reviewed by: Ralf S. Engelschall
Diffstat (limited to 'util/perlpath.pl')
-rwxr-xr-xutil/perlpath.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/util/perlpath.pl b/util/perlpath.pl
index 0aa5ada367..a1f236bd98 100755
--- a/util/perlpath.pl
+++ b/util/perlpath.pl
@@ -17,7 +17,12 @@ sub wanted
@a=<IN>;
close(IN);
- $a[0]="#!$ARGV[0]/perl\n";
+ if (-d $ARGV[0]) {
+ $a[0]="#!$ARGV[0]/perl\n";
+ }
+ else {
+ $a[0]="#!$ARGV[0]\n";
+ }
# Playing it safe...
$new="$_.new";