Line | |
---|
1 | #! /bin/sh
|
---|
2 | # mkinstalldirs --- make directory hierarchy
|
---|
3 | # Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
---|
4 | # Created: 1993-05-16
|
---|
5 | # Last modified: 1994-03-25
|
---|
6 | # Public domain
|
---|
7 |
|
---|
8 | errstatus=0
|
---|
9 |
|
---|
10 | for file in ${1+"$@"} ; do
|
---|
11 | #set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
---|
12 | set fnord `echo "$file" | sed 's/\([^:]\)\//\1 /g'`
|
---|
13 | shift
|
---|
14 |
|
---|
15 | pathcomp=
|
---|
16 | for d in ${1+"$@"} ; do
|
---|
17 | pathcomp="$pathcomp$d"
|
---|
18 | case "$pathcomp" in
|
---|
19 | -* ) pathcomp=./$pathcomp ;;
|
---|
20 | esac
|
---|
21 |
|
---|
22 | if test ! -d "$pathcomp"; then
|
---|
23 | echo "mkdir $pathcomp" 1>&2
|
---|
24 | mkdir "$pathcomp" || errstatus=$?
|
---|
25 | fi
|
---|
26 |
|
---|
27 | pathcomp="$pathcomp/"
|
---|
28 | done
|
---|
29 | done
|
---|
30 |
|
---|
31 | exit $errstatus
|
---|
32 |
|
---|
33 | # mkinstalldirs ends here
|
---|
Note:
See
TracBrowser
for help on using the repository browser.