diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-08 16:02:42 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-08 16:02:42 +0000 |
commit | 81e9f8ba95666216929845beb470526d17d22cfa (patch) | |
tree | 863049b6170bb735c19af0d0440fb5aab6e9b754 /mkinstalldirs | |
parent | af1d0287e1b34de77a197633b1770dc9b77fbcf6 (diff) |
silly people that don't want to install/run autoconf :-)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@25628 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'mkinstalldirs')
-rwxr-xr-x | mkinstalldirs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mkinstalldirs b/mkinstalldirs new file mode 100755 index 000000000..6b3b5fc5d --- /dev/null +++ b/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$ + +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 |