autoconf/mkinstalldirs

33 lines
649 B
Plaintext
Raw Normal View History

1993-05-17 02:03:08 +08:00
#!/bin/sh
1994-03-17 21:16:04 +08:00
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
1994-03-26 12:01:14 +08:00
# Last modified: 1994-03-25
1994-03-17 21:16:04 +08:00
# Public domain
1993-05-17 02:03:08 +08:00
1993-08-13 23:07:14 +08:00
errstatus=0
1993-05-17 02:03:08 +08:00
for file in ${1+"$@"} ; do
1994-03-26 12:01:14 +08:00
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
1994-03-17 21:16:04 +08:00
shift
1993-05-17 02:03:08 +08:00
1994-03-17 21:16:04 +08:00
pathcomp=
1993-08-13 23:07:14 +08:00
for d in ${1+"$@"} ; do
1994-03-17 21:16:04 +08:00
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
1993-05-17 02:03:08 +08:00
1994-03-17 21:16:04 +08:00
if test ! -d "$pathcomp"; then
1993-05-17 02:03:08 +08:00
echo "mkdir $pathcomp" 1>&2
1994-03-17 21:16:04 +08:00
mkdir "$pathcomp" || errstatus=$?
1993-05-17 02:03:08 +08:00
fi
1994-03-17 21:16:04 +08:00
pathcomp="$pathcomp/"
1993-05-17 02:03:08 +08:00
done
done
1993-08-13 23:07:14 +08:00
exit $errstatus
1994-03-17 21:16:04 +08:00
# mkinstalldirs ends here