etlegacy-libs/curl/mkinstalldirs
Remy Marquis 5d31d90fa4 Reverted to cURL 7.26
This reverts commit dad99ac8e3.
This reverts commit e5639398e7.
This reverts commit cf4eae3ded.
2015-03-05 12:02:51 +01:00

39 lines
683 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
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir -m0755 $pathcomp" 1>&2
mkdir -m0755 "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here