summaryrefslogtreecommitdiffstats
path: root/contrib/groff/mkinstalldirs
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2000-12-05 18:49:44 +0000
committerru <ru@FreeBSD.org>2000-12-05 18:49:44 +0000
commita812d8b090bc4edc23150bff257717b24f282e41 (patch)
tree19d4540966cb92612af25d5154efcc062eefb5c5 /contrib/groff/mkinstalldirs
parent2e2c9047c3a8b5b6fdcdcd4585d5b114f31cd386 (diff)
downloadFreeBSD-src-a812d8b090bc4edc23150bff257717b24f282e41.zip
FreeBSD-src-a812d8b090bc4edc23150bff257717b24f282e41.tar.gz
Virgin import of FSF groff v1.16.1
Diffstat (limited to 'contrib/groff/mkinstalldirs')
-rwxr-xr-xcontrib/groff/mkinstalldirs40
1 files changed, 40 insertions, 0 deletions
diff --git a/contrib/groff/mkinstalldirs b/contrib/groff/mkinstalldirs
new file mode 100755
index 0000000..a4f0e98
--- /dev/null
+++ b/contrib/groff/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 2000/02/06 09:34:43 wlemb 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
OpenPOWER on IntegriCloud