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