haiku/src/libs/termcap/mkinstalldirs
Jérôme Duval 5a42e3e556 Added Gnu termcap 1.3.1
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7722 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-01 09:30:19 +00:00

33 lines
606 B
Bash

#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
errstatus=0
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d in ${1+"$@"} ; do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp" 1>&2
mkdir "$pathcomp" || errstatus=$?
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here