ncurses 5.6 - patch 20070331
[ncurses.git] / mkdirs.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 55%
rename from mkinstalldirs
rename to mkdirs.sh
index ffe7494..59fc39c
+++ b/mkdirs.sh
@@ -1,10 +1,12 @@
 #! /bin/sh
+# $Id: mkdirs.sh,v 1.5 2007/03/25 22:29:46 tom Exp $
+# -----------------------------------------------------------------------------
 # mkinstalldirs --- make directory hierarchy
 # Author: Noah Friedman <friedman@prep.ai.mit.edu>
 # Created: 1993-05-16
 # Last modified: 1994-03-25
 # Public domain
-#
+# -----------------------------------------------------------------------------
 
 errstatus=0
 umask 022
@@ -24,8 +26,19 @@ for file in ${1+"$@"} ; do
         echo "mkdir $pathcomp" 1>&2
         case "$pathcomp" in
           [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]: )
-                ;;               # DOSISH systems
-          * )          mkdir "$pathcomp" || errstatus=$? ;;
+            ;;               # DOSISH systems
+          * )
+            mkdir "$pathcomp"
+            errstatus=$?
+            if test $errstatus != 0
+            then
+               # may have failed if invoked in a parallel "make -j# install"
+               if test -d "$pathcomp"
+               then
+                  errstatus=0
+               fi
+            fi
+            ;;
         esac
      fi