Skip to content
Snippets Groups Projects
Commit a251cf17 authored by sof's avatar sof
Browse files

[project @ 1997-05-18 03:52:42 by sof]

Fixed up
parent b000a28c
No related merge requests found
#!/bin/sh
#
# create a heirarchy of directories
# create a hierarchy of directories
#
# Based on Noah Friedman's mkinstalldirs..
#
errs=0
for f in $*; do
parts=`echo $f | sed 's,\(.\)/\(.\),\1 \2,g' | sed 's,/$,,'`;
parts=`echo ":$f" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
path="";
for p in $parts; do
if [ x"$path" = x ]; then
dir=$p;
else
dir=$path/$p;
fi;
if [ ! -d $dir ]; then
echo mkdir $dir;
mkdir $dir;
chmod a+rx $dir;
fi;
path=$dir;
path="$path$p"
case "$path" in
-* ) path=./$path ;;
esac
if test ! -d "$path"; then
echo "mkdir $path" 1>&2
mkdir "$path" || lasterr=$?
if test ! -d "$path"; then
errs=$lasterr
fi
fi
path="$path/";
done;
done
exit $errs
# end of story
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment