freebsd-dev/crypto/openssh/mkinstalldirs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
633 B
Plaintext
Raw Normal View History

2002-06-27 22:31:32 +00:00
#! /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
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
2004-02-26 10:38:49 +00:00
echo "mkdir $pathcomp"
2002-06-27 22:31:32 +00:00
2004-02-26 10:38:49 +00:00
mkdir "$pathcomp" || lasterr=$?
2002-06-27 22:31:32 +00:00
2004-02-26 10:38:49 +00:00
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
2002-06-27 22:31:32 +00:00
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here