aboutsummaryrefslogtreecommitdiffstats
path: root/mkinstalldirs
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2000-03-10 12:02:43 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2000-03-10 12:02:43 +0000
commit32b5a154a49a57c94b26102105bc7adb308022e4 (patch)
tree072edbca87c53c233d790348843db050c4c3c31a /mkinstalldirs
parentc56cd5c1ad40717772fa9212dbeca34ac0a2c305 (diff)
downloadlcd4linux-32b5a154a49a57c94b26102105bc7adb308022e4.tar.gz
[lcd4linux @ 2000-03-10 12:02:43 by reinelt]
autoconf/automake git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@8 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
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..7cb8639
--- /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/03/10 12:02:43 reinelt 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