From: Roland McGrath Date: Sun, 16 May 1993 18:03:08 +0000 (+0000) Subject: Initial revision X-Git-Tag: fsf-origin~897 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d109fcaa02eba1fea6717ac649d04006f18e2e6c;p=thirdparty%2Fautoconf.git Initial revision --- diff --git a/mkinstalldirs b/mkinstalldirs new file mode 100755 index 000000000..a87fe222f --- /dev/null +++ b/mkinstalldirs @@ -0,0 +1,32 @@ +#!/bin/sh +# Make directory hierarchy. +# Written by Noah Friedman +# Public domain. + +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +for file in ${1+"$@"} ; do + oIFS="${IFS}"; IFS='/'; set - ${file}; IFS="${oIFS}" + test ".${1}" = "." && shift + + case "${file}" in + /* ) pathcomp='/' ;; + * ) pathcomp='' ;; + esac + + while test $# -ne 0 ; do + pathcomp="${pathcomp}${1}" + shift + + if test ! -d "${pathcomp}"; then + echo "mkdir $pathcomp" 1>&2 + mkdir "${pathcomp}" + fi + + pathcomp="${pathcomp}/" + done +done + +# eof