* mkinstalldirs: new file to be used for `make install'
authorNathan Bryant <loanshark@uncensored.citadel.org>
Wed, 28 Oct 1998 19:40:07 +0000 (19:40 +0000)
committerNathan Bryant <loanshark@uncensored.citadel.org>
Wed, 28 Oct 1998 19:40:07 +0000 (19:40 +0000)
citadel/ChangeLog
citadel/mkinstalldirs [new file with mode: 0755]

index fc466be6bcf68bb1647f2637e7e9bdc0e7fd15c1..7f1efcd955d047ab8237bb7c02bcdfb0289f4ad1 100644 (file)
@@ -1,5 +1,6 @@
 1998-10-28 Nathan Bryant <bryant@cs.usm.maine.edu>
        * configure.in: added comments
+       * mkinstalldirs: new file to be used for `make install'
 
 Tue Oct 27 22:25:42 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Unified the "unpacked database" format for both upgrades and
diff --git a/citadel/mkinstalldirs b/citadel/mkinstalldirs
new file mode 100755 (executable)
index 0000000..d0fd194
--- /dev/null
@@ -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$
+
+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