X-Git-Url: http://git.sthu.org/?a=blobdiff_plain;f=keyanalyze%2Fpgpring%2Fmkinstalldirs;fp=keyanalyze%2Fpgpring%2Fmkinstalldirs;h=0134b33f056e430dddb93a510c6d4d7d07ddc670;hb=e69aea6f5797cb54f3748b983ffc977958f347cc;hp=0000000000000000000000000000000000000000;hpb=6b7cb7ca3a817c2e0510957115a2d1f1bed5c549;p=pgp-tools.git diff --git a/keyanalyze/pgpring/mkinstalldirs b/keyanalyze/pgpring/mkinstalldirs new file mode 100755 index 0000000..0134b33 --- /dev/null +++ b/keyanalyze/pgpring/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +# $Id: mkinstalldirs,v 2.0 1998/12/12 08:06:46 roessler Rel $ + +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