Files
assaultcube-/source/enet/mkinstalldirs
T
driAn 29b9ef1da1 no message
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@375 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2006-08-31 21:57:47 +00:00

41 lines
730 B
Bash
Executable File

#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <[email protected]>
# Created: 1993-05-16
# Public domain
# $Id: mkinstalldirs,v 1.2 2006-08-31 21:52:06 adrian_henke Exp $
errstatus=0
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here