summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2006-08-06 07:45:52 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2006-08-06 07:45:52 (GMT)
commita44487281dcb259187efbd70817cc8ce9f36e72d (patch)
tree50ddca61633f2f735118e9bcbc364417b13be51e /bin
parentc3b9788c9fbcade2819a297f2d8f09393dc1b55e (diff)
downloadhdf5-a44487281dcb259187efbd70817cc8ce9f36e72d.zip
hdf5-a44487281dcb259187efbd70817cc8ce9f36e72d.tar.gz
hdf5-a44487281dcb259187efbd70817cc8ce9f36e72d.tar.bz2
[svn-r12547] Added code to try harder to locate the MANIFEST file in more locations.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/chkmanifest19
1 files changed, 16 insertions, 3 deletions
diff --git a/bin/chkmanifest b/bin/chkmanifest
index dba4bab..f82b477 100755
--- a/bin/chkmanifest
+++ b/bin/chkmanifest
@@ -60,9 +60,22 @@ test "$verbose" && echo " Checking MANIFEST..." 1>&2
# clean up $MANIFEST file when exits
trap "rm -f $MANIFEST" 0
-if [ ! -f MANIFEST ]; then
- echo MANIFEST file not found. Abort.
- exit 1
+# First make sure i am in the directory in which there is an MANIFEST file
+# and then do the checking from there. Will try the following,
+# current directory, parent directory, the directory this command resides.
+if [ -f MANIFEST ]; then
+ continue
+elif [ -f ../MANIFEST ]; then
+ cd ..
+else
+ commanddir=`dirname $0`
+ if [ -d "$commanddir" -a -f $commanddir/MANIFEST ]; then
+ cd $commanddir
+ continue
+ else
+ echo MANIFEST file not found. Abort.
+ exit 1
+ fi
fi
# Copy the manifest file to get a list of file names.