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 #!/bin/sh
# #
# create a heirarchy of directories # create a hierarchy of directories
# #
# Based on Noah Friedman's mkinstalldirs..
#
errs=0
for f in $*; do 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=""; path="";
for p in $parts; do for p in $parts; do
if [ x"$path" = x ]; then path="$path$p"
dir=$p; case "$path" in
else -* ) path=./$path ;;
dir=$path/$p; esac
fi;
if [ ! -d $dir ]; then if test ! -d "$path"; then
echo mkdir $dir; echo "mkdir $path" 1>&2
mkdir $dir;
chmod a+rx $dir; mkdir "$path" || lasterr=$?
fi;
path=$dir; if test ! -d "$path"; then
errs=$lasterr
fi
fi
path="$path/";
done; done;
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