Commit | Line | Data |
8d063cd8 |
1 | case $CONFIG in |
2 | '') |
3 | if test ! -f config.sh; then |
4 | ln ../config.sh . || \ |
5 | ln ../../config.sh . || \ |
6 | ln ../../../config.sh . || \ |
7 | (echo "Can't find config.sh."; exit 1) |
fe14fcc3 |
8 | fi 2>/dev/null |
378cc40b |
9 | . ./config.sh |
8d063cd8 |
10 | ;; |
11 | esac |
12 | case "$0" in |
13 | */*) cd `expr X$0 : 'X\(.*\)/'` ;; |
14 | esac |
15 | echo "Extracting makedir (with variable substitutions)" |
16 | $spitshell >makedir <<!GROK!THIS! |
17 | $startsh |
fe14fcc3 |
18 | # $Header: makedir.SH,v 4.0 91/03/20 01:27:13 lwall Locked $ |
8d063cd8 |
19 | # |
20 | # $Log: makedir.SH,v $ |
fe14fcc3 |
21 | # Revision 4.0 91/03/20 01:27:13 lwall |
22 | # 4.0 baseline. |
23 | # |
8d063cd8 |
24 | # |
25 | |
26 | export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$) |
27 | |
28 | case \$# in |
29 | 0) |
30 | $echo "makedir pathname filenameflag" |
31 | exit 1 |
32 | ;; |
33 | esac |
34 | |
35 | : guarantee one slash before 1st component |
36 | case \$1 in |
37 | /*) ;; |
38 | *) set ./\$1 \$2 ;; |
39 | esac |
40 | |
41 | : strip last component if it is to be a filename |
42 | case X\$2 in |
43 | X1) set \`$echo \$1 | $sed 's:\(.*\)/[^/]*\$:\1:'\` ;; |
44 | *) set \$1 ;; |
45 | esac |
46 | |
47 | : return reasonable status if nothing to be created |
48 | if $test -d "\$1" ; then |
49 | exit 0 |
50 | fi |
51 | |
52 | list='' |
53 | while true ; do |
54 | case \$1 in |
55 | */*) |
56 | list="\$1 \$list" |
57 | set \`echo \$1 | $sed 's:\(.*\)/:\1 :'\` |
58 | ;; |
59 | *) |
60 | break |
61 | ;; |
62 | esac |
63 | done |
64 | |
65 | set \$list |
66 | |
67 | for dir do |
68 | $mkdir \$dir >/dev/null 2>&1 |
69 | done |
70 | !GROK!THIS! |
71 | $eunicefix makedir |
378cc40b |
72 | chmod +x makedir |