[project @ 2005-01-21 19:58:51 by sof]
[ghc-hetmet.git] / ghc / rts / gmp / mkinstalldirs
index cd1fe0a..5e17cd3 100644 (file)
@@ -12,15 +12,21 @@ do
    shift
 
    pathcomp=
-   for d in ${1+"$@"} ; do
+   for d
+   do
      pathcomp="$pathcomp$d"
      case "$pathcomp" in
        -* ) pathcomp=./$pathcomp ;;
      esac
 
      if test ! -d "$pathcomp"; then
-        echo "mkdir $pathcomp" 1>&2
-        mkdir "$pathcomp" || errstatus=$?
+        echo "mkdir $pathcomp"
+
+        mkdir "$pathcomp" || lasterr=$?
+
+        if test ! -d "$pathcomp"; then
+         errstatus=$lasterr
+        fi
      fi
 
      pathcomp="$pathcomp/"