summaryrefslogtreecommitdiff
path: root/src/mkinstalldirs
diff options
context:
space:
mode:
authorErik Reckase <e.reckase@gmail.com>2010-04-19 19:52:20 +0000
committerScott Draves <spot@draves.org>2015-02-15 12:20:11 -0500
commit0b31b96c55620dcf7c5ca657d3572a8c635c971b (patch)
tree05b3537d9ab91736d00604aebb7c2d71bdaf005e /src/mkinstalldirs
parent238395d5515e30af28983f93075bbcbf248d4903 (diff)
downloadpucket-0b31b96c55620dcf7c5ca657d3572a8c635c971b.tar.gz
pucket-0b31b96c55620dcf7c5ca657d3572a8c635c971b.tar.bz2
pucket-0b31b96c55620dcf7c5ca657d3572a8c635c971b.zip
Initial commit of early-clip branch of flam3 into google code.
git-svn-id: https://flam3.googlecode.com/svn/trunk@3 77852712-ef1d-11de-8684-7d64432d61a3
Diffstat (limited to 'src/mkinstalldirs')
-rwxr-xr-xsrc/mkinstalldirs40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/mkinstalldirs b/src/mkinstalldirs
new file mode 100755
index 0000000..318cc98
--- /dev/null
+++ b/src/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