summaryrefslogtreecommitdiff
path: root/dmake/mkinstalldirs
diff options
context:
space:
mode:
authorMartin Hollmichel <mh@openoffice.org>2001-04-20 13:15:45 +0000
committerMartin Hollmichel <mh@openoffice.org>2001-04-20 13:15:45 +0000
commitb0b969c93e5c62812f48274ff62c8c593bee4ee8 (patch)
treed91acd0bfb296a49f4f0195834b4209195670c94 /dmake/mkinstalldirs
parentd3e05102c06a8086f5113ba4367122e1092ac566 (diff)
preparation for autoconf and automake for dmake
Diffstat (limited to 'dmake/mkinstalldirs')
-rwxr-xr-xdmake/mkinstalldirs40
1 files changed, 40 insertions, 0 deletions
diff --git a/dmake/mkinstalldirs b/dmake/mkinstalldirs
new file mode 100755
index 000000000000..2dba0a7a3beb
--- /dev/null
+++ b/dmake/mkinstalldirs
@@ -0,0 +1,40 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+# $Id: mkinstalldirs,v 1.1 2001-04-20 14:15:45 mh 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