summaryrefslogtreecommitdiff
path: root/utils/mkdirhier
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-11-07 12:08:47 +0000
committerIan Lynagh <igloo@earth.li>2009-11-07 12:08:47 +0000
commitfef6fe2613ea03e5405f4b5aa38d4647df44b075 (patch)
treeaec26f13478e129e64e485881ae72a5a93cc52f4 /utils/mkdirhier
parentb88939db1ac65aa00df79e6b945f67d63aeced30 (diff)
downloadhaskell-fef6fe2613ea03e5405f4b5aa38d4647df44b075.tar.gz
mkdirhier now just calls mkdir -p
The old shell code apparently didn't work properly with /bin/sh=dash
Diffstat (limited to 'utils/mkdirhier')
-rw-r--r--utils/mkdirhier/mkdirhier.sh43
1 files changed, 1 insertions, 42 deletions
diff --git a/utils/mkdirhier/mkdirhier.sh b/utils/mkdirhier/mkdirhier.sh
index c6261f42e8..4c5d5f73f7 100644
--- a/utils/mkdirhier/mkdirhier.sh
+++ b/utils/mkdirhier/mkdirhier.sh
@@ -1,45 +1,4 @@
#!/bin/sh
-#
-# create a hierarchy of directories
-#
-# Based on Noah Friedman's mkinstalldirs..
-#
+mkdir -p ${1+"$@"}
-quiet=no
-errs=0
-
-if [ "$1" = "-q" ]
-then
- shift
- quiet=yes
-fi
-
-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
- if [ "$quiet" = "no" ]
- then
- echo "mkdir $path" 1>&2
- fi
-
- mkdir "$path" || lasterr=$?
-
- if test ! -d "$path"; then
- errs=$lasterr
- fi
- fi
- path="$path/";
- done;
-done
-
-exit $errs
-
-# end of story