summaryrefslogtreecommitdiff
path: root/mkinstalldirs
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-05-20 15:33:44 +1000
committerDamien Miller <djm@mindrot.org>2000-05-20 15:33:44 +1000
commitfda78d9bd07673e14e8646798a7453e3d9302de5 (patch)
tree944046756e29f962e954945e02062321390922e2 /mkinstalldirs
parent7d6656c1283f46d9cdbba707ea2373af3d994585 (diff)
downloadopenssh-git-fda78d9bd07673e14e8646798a7453e3d9302de5.tar.gz
- HPUX and Configure fixes from Lutz Jaenicke
<Lutz.Jaenicke@aet.TU-Cottbus.DE> - Use mkinstalldirs script to make directories instead of non-portable "install -d". Suggested by Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
Diffstat (limited to 'mkinstalldirs')
-rwxr-xr-xmkinstalldirs40
1 files changed, 40 insertions, 0 deletions
diff --git a/mkinstalldirs b/mkinstalldirs
new file mode 100755
index 00000000..614ef33d
--- /dev/null
+++ b/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 2000/05/20 05:33:45 damien 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