X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=mkinstalldirs;fp=mkinstalldirs;h=3614101dbaed9187342d3311ab9527e24c90fdea;hb=78e049108ef4c65f1dc3dddd747e59b90b75a9a6;hp=0000000000000000000000000000000000000000;hpb=4553ace9ab808a5db41bd7e03db6b8b4e9f8acc7;p=yaz-moved-to-github.git diff --git a/mkinstalldirs b/mkinstalldirs new file mode 100755 index 0000000..3614101 --- /dev/null +++ b/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +# $Id: mkinstalldirs,v 1.1 2000-02-28 11:20:05 adam 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