summaryrefslogtreecommitdiff
path: root/doSH
diff options
context:
space:
mode:
authorLarry Wall <lwall@netlabs.com>1991-06-06 23:28:02 +0000
committerLarry Wall <lwall@netlabs.com>1991-06-06 23:28:02 +0000
commit6e21c824d91ef0b4ae60b95b347e344e5bb4d38a (patch)
treecc298b664815eb149de874f4694ea9d4b3f08308 /doSH
parent2b317908ea5309ab202d1cdbadccfdf42d10e2b1 (diff)
downloadperl-6e21c824d91ef0b4ae60b95b347e344e5bb4d38a.tar.gz
perl 4.0 patch 6: patch #4, continued
See patch #4.
Diffstat (limited to 'doSH')
-rw-r--r--doSH36
1 files changed, 36 insertions, 0 deletions
diff --git a/doSH b/doSH
new file mode 100644
index 0000000000..4b02784d79
--- /dev/null
+++ b/doSH
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+: if this fails, just run all the .SH files by hand
+. ./config.sh
+
+echo " "
+echo "Doing variable substitutions on .SH files..."
+set x `awk '{print $1}' <MANIFEST | grep '\.SH'`
+shift
+case $# in
+0) set x *.SH; shift;;
+esac
+if test ! -f $1; then
+ shift
+fi
+for file in $*; do
+ set X
+ shift
+ chmod +x $file
+ case "$file" in
+ */*)
+ dir=`expr X$file : 'X\(.*\)/'`
+ file=`expr X$file : 'X.*/\(.*\)'`
+ (cd $dir && . $file)
+ ;;
+ *)
+ . $file
+ ;;
+ esac
+done
+if test -f config.h.SH; then
+ if test ! -f config.h; then
+ : oops, they left it out of MANIFEST, probably, so do it anyway.
+ . config.h.SH
+ fi
+fi