summaryrefslogtreecommitdiffstats
path: root/bin/mkdirs
diff options
context:
space:
mode:
authorcvs2svn <no_author@cvs2svn>2001-09-27 13:49:26 (GMT)
committercvs2svn <no_author@cvs2svn>2001-09-27 13:49:26 (GMT)
commit48948d51b9f47affcebd409ab41c5e04cf75fb5a (patch)
tree3672c9319f4fcbb7c45f7718573f8f62008b3b2c /bin/mkdirs
parent413ed626c5423feabfbf9f5f7d63e49a98eb2f2e (diff)
downloadhdf5-48948d51b9f47affcebd409ab41c5e04cf75fb5a.zip
hdf5-48948d51b9f47affcebd409ab41c5e04cf75fb5a.tar.gz
hdf5-48948d51b9f47affcebd409ab41c5e04cf75fb5a.tar.bz2
[svn-r4483] This commit was manufactured by cvs2svn to create branch 'hdf5_1_4'.
Diffstat (limited to 'bin/mkdirs')
-rwxr-xr-xbin/mkdirs26
1 files changed, 26 insertions, 0 deletions
diff --git a/bin/mkdirs b/bin/mkdirs
new file mode 100755
index 0000000..5590718
--- /dev/null
+++ b/bin/mkdirs
@@ -0,0 +1,26 @@
+#! /bin/sh
+#
+# Copyright (C) 2001
+# National Center for Supercomputing Applications
+# All rights reserved.
+#
+# This is a small program which will create directories n-levels deep.
+# You just call it with something like:
+#
+# mkdirs /tmp/foo/bar/baz
+#
+# and it will create all the directories from /tmp down to baz which
+# don't exist.
+#
+chmodprog="${CHMODPROG-chmod}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+make_dir () {
+ if test ! -d $1; then
+ make_dir `echo $1 | sed -e 's#/[^/]*$##'`
+ $mkdirprog $1
+ $chmodprog 755 $1
+ fi
+}
+
+make_dir `echo $1 | sed -e 's#/$##'`