diff options
Diffstat (limited to 'x2p')
-rw-r--r-- | x2p/a2py.c | 4 | ||||
-rw-r--r-- | x2p/find2perl.PL | 10 | ||||
-rw-r--r-- | x2p/s2p.PL | 9 |
3 files changed, 13 insertions, 10 deletions
diff --git a/x2p/a2py.c b/x2p/a2py.c index 454e2dc860..0c37b6bbf9 100644 --- a/x2p/a2py.c +++ b/x2p/a2py.c @@ -154,7 +154,9 @@ register char **env; tmpstr = walk(0,0,root,&i,P_MIN); str = str_make(STARTPERL); - str_cat(str, "\neval 'exec perl -S $0 \"$@\"'\n\ + str_cat(str, "\neval 'exec "); + str_cat(str, BIN); + str_cat(str, "/perl -S $0 ${1+\"$@\"}'\n\ if $running_under_some_shell;\n\ # this emulates #! processing on NIH machines.\n\ # (remove #! line above if indigestible)\n\n"); diff --git a/x2p/find2perl.PL b/x2p/find2perl.PL index 32f78fe23f..c024faf9fd 100644 --- a/x2p/find2perl.PL +++ b/x2p/find2perl.PL @@ -25,10 +25,11 @@ print "Extracting $file (with variable substitutions)\n"; # You can use $Config{...} to use Configure variables. print OUT <<"!GROK!THIS!"; -$Config{'startperl'} - eval 'exec perl -S \$0 "\$@"' - if 0; +$Config{startperl} + eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}' + if \$running_under_some_shell; \$startperl = "$Config{startperl}"; +\$perlpath = "$Config{perlpath}"; !GROK!THIS! # In the following, perl variables are not expanded during extraction. @@ -241,8 +242,7 @@ while (@ARGV) { print <<"END"; $startperl - -eval 'exec perl -S \$0 \${1+"\$@"}' + eval 'exec $perlpath -S \$0 \${1+"\$@"}' if \$running_under_some_shell; END diff --git a/x2p/s2p.PL b/x2p/s2p.PL index 9d7297b2ae..e5c5bd6f01 100644 --- a/x2p/s2p.PL +++ b/x2p/s2p.PL @@ -25,10 +25,11 @@ print "Extracting $file (with variable substitutions)\n"; # You can use $Config{...} to use Configure variables. print OUT <<"!GROK!THIS!"; -$Config{'startperl'} - eval 'exec perl -S \$0 "\$@"' - if 0; +$Config{startperl} + eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}' + if \$running_under_some_shell; \$startperl = "$Config{startperl}"; +\$perlpath = "$Config{perlpath}"; !GROK!THIS! # In the following, perl variables are not expanded during extraction. @@ -366,7 +367,7 @@ unless ($debug) { print &q(<<"EOT"); : $startperl -: eval 'exec perl -S \$0 \${1+"\$@"}' +: eval 'exec $perlpath -S \$0 \${1+"\$@"}' : if \$running_under_some_shell; : EOT |