summaryrefslogtreecommitdiff
path: root/utils/mkdirhier
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-06-27 23:35:28 +0000
committerIan Lynagh <igloo@earth.li>2008-06-27 23:35:28 +0000
commitb95f3f4a43d0fc7d45227b3eec8999132e5694a1 (patch)
treecc36e6766f87227b751c772bb66f43e45146d516 /utils/mkdirhier
parentd54fc08bb46e3fb805b5ac90ce69b7d82c22beef (diff)
downloadhaskell-b95f3f4a43d0fc7d45227b3eec8999132e5694a1.tar.gz
mkdirhier.sh now accepts -q, which makes it be quiet
Diffstat (limited to 'utils/mkdirhier')
-rw-r--r--utils/mkdirhier/mkdirhier.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/utils/mkdirhier/mkdirhier.sh b/utils/mkdirhier/mkdirhier.sh
index 3ae24b3c6e..c6261f42e8 100644
--- a/utils/mkdirhier/mkdirhier.sh
+++ b/utils/mkdirhier/mkdirhier.sh
@@ -5,8 +5,16 @@
#
# Based on Noah Friedman's mkinstalldirs..
#
+
+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="";
@@ -17,7 +25,10 @@ for f in $*; do
esac
if test ! -d "$path"; then
- echo "mkdir $path" 1>&2
+ if [ "$quiet" = "no" ]
+ then
+ echo "mkdir $path" 1>&2
+ fi
mkdir "$path" || lasterr=$?