Fix #4346 (INLINABLE pragma not behaving consistently)
[ghc-hetmet.git] / utils / mkdirhier / mkdirhier.sh
index 3ae24b3..4c5d5f7 100644 (file)
@@ -1,34 +1,4 @@
 #!/bin/sh
 
-#
-# create a hierarchy of directories
-#
-# Based on Noah Friedman's mkinstalldirs..
-#
-errs=0
+mkdir -p ${1+"$@"}
 
-for f in $*; do
-    parts=`echo ":$f" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-    path="";
-    for p in $parts; do
-        path="$path$p"
-        case "$path" in
-          -* ) path=./$path ;;
-        esac
-
-        if test ! -d "$path"; then
-           echo "mkdir $path" 1>&2
-
-           mkdir "$path" || lasterr=$?
-          
-          if test ! -d "$path"; then
-             errs=$lasterr
-           fi 
-        fi
-       path="$path/";
-    done;
-done
-
-exit $errs
-
-# end of story