diff options
author | trhodes <trhodes@FreeBSD.org> | 2004-09-19 01:30:24 +0000 |
---|---|---|
committer | trhodes <trhodes@FreeBSD.org> | 2004-09-19 01:30:24 +0000 |
commit | 06246360f70ba2ce65a63d5c52289cd33256bc99 (patch) | |
tree | 97706b7f62557da0a2539b026e5cf66008ddf8c6 /contrib/bind9/mkinstalldirs | |
download | FreeBSD-src-06246360f70ba2ce65a63d5c52289cd33256bc99.zip FreeBSD-src-06246360f70ba2ce65a63d5c52289cd33256bc99.tar.gz |
Vender import of BIND 9.3.0rc4.
Diffstat (limited to 'contrib/bind9/mkinstalldirs')
-rwxr-xr-x | contrib/bind9/mkinstalldirs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/contrib/bind9/mkinstalldirs b/contrib/bind9/mkinstalldirs new file mode 100755 index 0000000..4992567 --- /dev/null +++ b/contrib/bind9/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/09/20 19:05:51 gson 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 |