Commit | Line | Data |
6e21c824 |
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 |
7 | |
6e21c824 |
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.*/\(.*\)'` |
db4e6270 |
26 | (cd $dir && . ./$file) |
6e21c824 |
27 | ;; |
28 | *) |
db4e6270 |
29 | . ./$file |
6e21c824 |
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. |
db4e6270 |
36 | . ./config.h.SH |
6e21c824 |
37 | fi |
38 | fi |
db4e6270 |
39 | exit 0 |