summaryrefslogtreecommitdiff
path: root/build/mkdir.sh
diff options
context:
space:
mode:
authorLorry <lorry@roadtrain.codethink.co.uk>2012-08-28 17:19:40 +0100
committerLorry <lorry@roadtrain.codethink.co.uk>2012-08-28 17:19:40 +0100
commit9eb41448747f514394eb3163b3019b13cb7455f4 (patch)
tree4109e781880c68c682821ec90df8a892f9e39048 /build/mkdir.sh
downloadlibapr-util-tarball-9eb41448747f514394eb3163b3019b13cb7455f4.tar.gz
Tarball conversion
Diffstat (limited to 'build/mkdir.sh')
-rwxr-xr-xbuild/mkdir.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/build/mkdir.sh b/build/mkdir.sh
new file mode 100755
index 0000000..b947c92
--- /dev/null
+++ b/build/mkdir.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+##
+## mkdir.sh -- make directory hierarchy
+##
+## Based on `mkinstalldirs' from Noah Friedman <friedman@prep.ai.mit.edu>
+## as of 1994-03-25, which was placed in the Public Domain.
+## Cleaned up for Apache's Autoconf-style Interface (APACI)
+## by Ralf S. Engelschall <rse@apache.org>
+##
+#
+# This script falls under the Apache License.
+# See http://www.apache.org/docs/LICENSE
+
+
+umask 022
+errstatus=0
+for file in ${1+"$@"} ; do
+ set fnord `echo ":$file" |\
+ sed -e 's/^:\//%/' -e 's/^://' -e 's/\// /g' -e 's/^%/\//'`
+ shift
+ pathcomp=
+ for d in ${1+"$@"}; do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ ?: ) pathcomp="$pathcomp/"
+ continue ;;
+ esac
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp" 1>&2
+ mkdir "$pathcomp" || errstatus=$?
+ fi
+ pathcomp="$pathcomp/"
+ done
+done
+exit $errstatus
+