Commit | Line | Data |
a02608de |
1 | case $PERL_CONFIG_SH in |
8d063cd8 |
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)" |
bee1dbe2 |
16 | rm -f makedir |
8d063cd8 |
17 | $spitshell >makedir <<!GROK!THIS! |
18 | $startsh |
a0d0e21e |
19 | # makedir.SH |
8d063cd8 |
20 | # |
21 | |
22 | export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$) |
23 | |
24 | case \$# in |
25 | 0) |
26 | $echo "makedir pathname filenameflag" |
27 | exit 1 |
28 | ;; |
29 | esac |
30 | |
31 | : guarantee one slash before 1st component |
32 | case \$1 in |
33 | /*) ;; |
34 | *) set ./\$1 \$2 ;; |
35 | esac |
36 | |
37 | : strip last component if it is to be a filename |
38 | case X\$2 in |
39 | X1) set \`$echo \$1 | $sed 's:\(.*\)/[^/]*\$:\1:'\` ;; |
40 | *) set \$1 ;; |
41 | esac |
42 | |
43 | : return reasonable status if nothing to be created |
44 | if $test -d "\$1" ; then |
45 | exit 0 |
46 | fi |
47 | |
48 | list='' |
49 | while true ; do |
50 | case \$1 in |
51 | */*) |
52 | list="\$1 \$list" |
53 | set \`echo \$1 | $sed 's:\(.*\)/:\1 :'\` |
54 | ;; |
55 | *) |
56 | break |
57 | ;; |
58 | esac |
59 | done |
60 | |
61 | set \$list |
62 | |
63 | for dir do |
64 | $mkdir \$dir >/dev/null 2>&1 |
65 | done |
66 | !GROK!THIS! |
67 | $eunicefix makedir |
378cc40b |
68 | chmod +x makedir |