Commit | Line | Data |
---|---|---|
6e21c824 LW |
1 | #!/bin/sh |
2 | ||
3 | : if this fails, just run all the .SH files by hand | |
4 | . ./config.sh | |
5 | ||
db4e6270 | 6 | rm -f x2p/config.sh |
988174c1 | 7 | cp cppstdin x2p |
db4e6270 | 8 | |
6e21c824 LW |
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.*/\(.*\)'` | |
db4e6270 | 27 | (cd $dir && . ./$file) |
6e21c824 LW |
28 | ;; |
29 | *) | |
db4e6270 | 30 | . ./$file |
6e21c824 LW |
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. | |
db4e6270 | 37 | . ./config.h.SH |
6e21c824 LW |
38 | fi |
39 | fi | |
db4e6270 | 40 | exit 0 |