2001-08-10 11:43:22 +02:00
|
|
|
#! /bin/sh
|
1996-08-21 01:46:10 +02:00
|
|
|
# mkinstalldirs --- make directory hierarchy
|
|
|
|
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
|
|
|
# Created: 1993-05-16
|
|
|
|
# Public domain
|
2001-08-10 11:43:22 +02:00
|
|
|
|
|
|
|
# $Id: mkinstalldirs,v 1.4 2001/04/12 13:02:39 dprice Exp $
|
1996-08-21 01:46:10 +02:00
|
|
|
|
|
|
|
errstatus=0
|
|
|
|
|
2001-08-10 11:43:22 +02:00
|
|
|
for file
|
|
|
|
do
|
1996-08-21 01:46:10 +02:00
|
|
|
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
|
|
|
shift
|
|
|
|
|
|
|
|
pathcomp=
|
2001-08-10 11:43:22 +02:00
|
|
|
for d
|
|
|
|
do
|
1996-08-21 01:46:10 +02:00
|
|
|
pathcomp="$pathcomp$d"
|
|
|
|
case "$pathcomp" in
|
|
|
|
-* ) pathcomp=./$pathcomp ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if test ! -d "$pathcomp"; then
|
2001-08-10 11:43:22 +02:00
|
|
|
echo "mkdir $pathcomp"
|
|
|
|
|
|
|
|
mkdir "$pathcomp" || lasterr=$?
|
|
|
|
|
|
|
|
if test ! -d "$pathcomp"; then
|
|
|
|
errstatus=$lasterr
|
|
|
|
fi
|
1996-08-21 01:46:10 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
pathcomp="$pathcomp/"
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
exit $errstatus
|
|
|
|
|
|
|
|
# mkinstalldirs ends here
|