summaryrefslogtreecommitdiff
path: root/pkgtools/rcorder/files/mkinstalldirs
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-08-27 03:06:07 +0000
committerjlam <jlam@pkgsrc.org>2004-08-27 03:06:07 +0000
commitd3019ed1f68e5cdec18f8ea394a2e598eba5b9e1 (patch)
treed246ae551570fa61a888f429ccaaa4ffa37c5cb7 /pkgtools/rcorder/files/mkinstalldirs
parentd60ad2662c6dba1d3523b7eea55808f50a66f9fb (diff)
downloadpkgsrc-d3019ed1f68e5cdec18f8ea394a2e598eba5b9e1.tar.gz
autconfiscate, and add a rcorder2nbcompat script to ease importing from
src HEAD.
Diffstat (limited to 'pkgtools/rcorder/files/mkinstalldirs')
-rwxr-xr-xpkgtools/rcorder/files/mkinstalldirs40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgtools/rcorder/files/mkinstalldirs b/pkgtools/rcorder/files/mkinstalldirs
new file mode 100755
index 00000000000..c2f7770c1e1
--- /dev/null
+++ b/pkgtools/rcorder/files/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 2004/08/27 03:06:07 jlam 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