diff options
author | Jim Meyering <jim@meyering.net> | 2000-06-06 16:51:00 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-06-06 16:51:00 +0000 |
commit | bfbc65d09ddd5348018e7af97ddbdcb8de57a590 (patch) | |
tree | 9650ebe5ba8dc1b72e2d743d5a8eeba99852cbf9 /mkinstalldirs | |
parent | 0ea3aa103779033142e6fcd1e75f5de1d78e3056 (diff) | |
download | idutils-bfbc65d09ddd5348018e7af97ddbdcb8de57a590.tar.gz idutils-bfbc65d09ddd5348018e7af97ddbdcb8de57a590.tar.bz2 idutils-bfbc65d09ddd5348018e7af97ddbdcb8de57a590.zip |
Update.
Diffstat (limited to 'mkinstalldirs')
-rwxr-xr-x | mkinstalldirs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/mkinstalldirs b/mkinstalldirs index 0801ec2..d0fd194 100755 --- a/mkinstalldirs +++ b/mkinstalldirs @@ -2,17 +2,20 @@ # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman <friedman@prep.ai.mit.edu> # Created: 1993-05-16 -# Last modified: 1994-03-25 # Public domain +# $Id$ + errstatus=0 -for file in ${1+"$@"} ; do +for file +do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= - for d in ${1+"$@"} ; do + for d + do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; @@ -20,7 +23,12 @@ for file in ${1+"$@"} ; do if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" 1>&2 - mkdir "$pathcomp" || errstatus=$? + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi fi pathcomp="$pathcomp/" |