summaryrefslogtreecommitdiff
path: root/x2p/find2perl.SH
diff options
context:
space:
mode:
Diffstat (limited to 'x2p/find2perl.SH')
-rw-r--r--x2p/find2perl.SH11
1 files changed, 9 insertions, 2 deletions
diff --git a/x2p/find2perl.SH b/x2p/find2perl.SH
index 032db6b6e0..7e49cd003f 100644
--- a/x2p/find2perl.SH
+++ b/x2p/find2perl.SH
@@ -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 {