perl 4.0 patch 25: patch #20, continued
[p5sagit/p5-mst-13.2.git] / x2p / find2perl.SH
index 032db6b..7e49cd0 100644 (file)
@@ -6,7 +6,7 @@ case $CONFIG in
        ln ../../../config.sh . || \
        (echo "Can't find config.sh."; exit 1)
     fi
-    . config.sh
+    . ./config.sh
     ;;
 esac
 : This forces SH files to create target in same directory as SH file.
@@ -19,9 +19,13 @@ echo "Extracting find2perl (with variable substitutions)"
 : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
 : Protect any dollar signs and backticks that you do not want interpreted
 : by putting a backslash in front.  You may delete these comments.
+rm -f find2perl
 $spitshell >find2perl <<!GROK!THIS!
 #!$bin/perl
 
+eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
+       if \$running_under_some_shell;
+
 \$bin = "$bin";
 
 !GROK!THIS!
@@ -232,6 +236,9 @@ while (@ARGV) {
 print <<"END";
 #!$bin/perl
 
+eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
+       if \$running_under_some_shell;
+
 END
 
 if ($initls) {
@@ -544,7 +551,7 @@ sub tab {
 
     $tabstring = "\t" x ($indent / 2) . ' ' x ($indent % 2 * 4);
     if (!$statdone) {
-       if ($_ =~ /^(name|print)/) {
+       if ($_ =~ /^(name|print|prune|exec|ok|\(|\))/) {
            $delayedstat++;
        }
        else {