summaryrefslogtreecommitdiffstats
path: root/bin/mkdirs
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2001-09-21 23:50:15 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2001-09-21 23:50:15 (GMT)
commit5e834c4cbc2353be2c9efd0f55dbdb23f87d9650 (patch)
treedc41435e33d8ef43faf0626d5083b0baa028d8da /bin/mkdirs
parent813dfea5147f18f01f8326d9de8eff85536824a5 (diff)
downloadhdf5-5e834c4cbc2353be2c9efd0f55dbdb23f87d9650.zip
hdf5-5e834c4cbc2353be2c9efd0f55dbdb23f87d9650.tar.gz
hdf5-5e834c4cbc2353be2c9efd0f55dbdb23f87d9650.tar.bz2
[svn-r4466]
Purpose: Feature Add Description: Added "install-example" and "install-all" to the Makefile system. The behaviour of the "make install*" options: make install - Installs binaries, libraries, include files, and example programs. make install-examples - Installs only the example programs. The directories are: ${prefix}/doc/hdf5/examples/{c,c++,fortran} make install-all - Install the binaries, libraries, include files, example programs, and documentation. The whole kit-n'-caboodle. make uninstall-examples - Get rid of those example files (but not the ${prefix}/doc/hdf5/examples/... directories) There's a new bin/ program which helps create directories which are deeply nested called "mkdirs". It's a simple shell script. Platforms tested: Linux
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..3d689ad
--- /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#/$##'`