perl 4.0 patch 13: patch #11, continued
[p5sagit/p5-mst-13.2.git] / doSH
1 #!/bin/sh
2
3 : if this fails, just run all the .SH files by hand
4 . ./config.sh
5
6 rm -f x2p/config.sh
7
8 echo " "
9 echo "Doing variable substitutions on .SH files..."
10 set x `awk '{print $1}' <MANIFEST | grep '\.SH'`
11 shift
12 case $# in
13 0) set x *.SH; shift;;
14 esac
15 if test ! -f $1; then
16     shift
17 fi
18 for file in $*; do
19     set X
20     shift
21     chmod +x $file
22     case "$file" in
23     */*)
24         dir=`expr X$file : 'X\(.*\)/'`
25         file=`expr X$file : 'X.*/\(.*\)'`
26         (cd $dir && . ./$file)
27         ;;
28     *)
29         . ./$file
30         ;;
31     esac
32 done
33 if test -f config.h.SH; then
34     if test ! -f config.h; then
35         : oops, they left it out of MANIFEST, probably, so do it anyway.
36         . ./config.h.SH
37     fi
38 fi
39 exit 0