summaryrefslogtreecommitdiff
path: root/mkinstalldirs
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2015-05-02 21:36:31 +0200
committerLars-Dominik Braun <lars@6xq.net>2015-05-02 21:36:31 +0200
commitb2dfbdf4d9644c684c938cb2730deab66aa06d9b (patch)
tree2710c26a94f8c85887389619682892363303f9db /mkinstalldirs
parentfb1c90e18b0d77a8b4035461722b89c7db46db51 (diff)
downloadpucket-b2dfbdf4d9644c684c938cb2730deab66aa06d9b.tar.gz
pucket-b2dfbdf4d9644c684c938cb2730deab66aa06d9b.tar.bz2
pucket-b2dfbdf4d9644c684c938cb2730deab66aa06d9b.zip
Move out of subdir
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 0000000..318cc98
--- /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.1.1 2004-10-26 19:54:13 spotspot 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" 1>&2
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ fi
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here