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