summaryrefslogtreecommitdiff
path: root/Build/source/config/mkinstalldirs
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-16 00:04:03 +0000
committerKarl Berry <karl@freefriends.org>2006-01-16 00:04:03 +0000
commitf896f9e413c0dc0d4178846634963c84505e5029 (patch)
tree40274f53d7ecb95f1996e22e4e3a2c88916c58a8 /Build/source/config/mkinstalldirs
parentcc68d22a4a87ea77bf2ea82288854d2abcfc1f3d (diff)
config
git-svn-id: svn://tug.org/texlive/trunk@1481 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/config/mkinstalldirs')
-rwxr-xr-xBuild/source/config/mkinstalldirs40
1 files changed, 40 insertions, 0 deletions
diff --git a/Build/source/config/mkinstalldirs b/Build/source/config/mkinstalldirs
new file mode 100755
index 00000000000..0ccd83951fc
--- /dev/null
+++ b/Build/source/config/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.2 1998/11/01 00:55:08 frystyk 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