This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 4.0 patch 20: (combined patch)
[perl5.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 cp cppstdin x2p
8
9 echo " "
10 echo "Doing variable substitutions on .SH files..."
11 set x `awk '{print $1}' <MANIFEST | grep '\.SH'`
12 shift
13 case $# in
14 0) set x *.SH; shift;;
15 esac
16 if test ! -f $1; then
17     shift
18 fi
19 for file in $*; do
20     set X
21     shift
22     chmod +x $file
23     case "$file" in
24     */*)
25         dir=`expr X$file : 'X\(.*\)/'`
26         file=`expr X$file : 'X.*/\(.*\)'`
27         (cd $dir && . ./$file)
28         ;;
29     *)
30         . ./$file
31         ;;
32     esac
33 done
34 if test -f config.h.SH; then
35     if test ! -f config.h; then
36         : oops, they left it out of MANIFEST, probably, so do it anyway.
37         . ./config.h.SH
38     fi
39 fi
40 exit 0