From: Noah Friedman Date: Fri, 3 May 1996 07:37:52 +0000 (+0000) Subject: Don't report an error if mkdir fails because a directory was X-Git-Tag: fsf-origin~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad9660e828c4f096e82e79648e56fea2c36fc1ad;p=thirdparty%2Fautoconf.git Don't report an error if mkdir fails because a directory was created by another process. --- diff --git a/mkinstalldirs b/mkinstalldirs index cd1fe0a7..d0fd194f 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/"