diff options
author | Noah Friedman <friedman@splode.com> | 1996-05-03 07:37:52 +0000 |
---|---|---|
committer | Noah Friedman <friedman@splode.com> | 1996-05-03 07:37:52 +0000 |
commit | 8962ae8d6b53a0c859d4c0723a0971da04eaba27 (patch) | |
tree | 099d5dd9ea4fca8a4fdf7bc443c6a43ee0f76de7 /mkinstalldirs | |
parent | Wed May 1 09:10:04 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> (diff) | |
download | glibc-8962ae8d6b53a0c859d4c0723a0971da04eaba27.tar.gz glibc-8962ae8d6b53a0c859d4c0723a0971da04eaba27.tar.bz2 glibc-8962ae8d6b53a0c859d4c0723a0971da04eaba27.zip |
Don't report an error if mkdir fails because a directory was created by another process.cvs/make-3-74-4cvs/libc-960503cvs/amigados-merge
Diffstat (limited to 'mkinstalldirs')
-rwxr-xr-x | mkinstalldirs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mkinstalldirs b/mkinstalldirs index cd1fe0a794..d0fd194fd6 100755 --- a/mkinstalldirs +++ b/mkinstalldirs @@ -4,6 +4,8 @@ # Created: 1993-05-16 # Public domain +# $Id$ + errstatus=0 for file @@ -12,7 +14,8 @@ do shift pathcomp= - for d in ${1+"$@"} ; do + for d + do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; @@ -20,7 +23,12 @@ 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/" |