diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2006-08-06 07:44:48 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2006-08-06 07:44:48 (GMT) |
commit | f91c5aa11c60433b9f8a7f05e48fd6d89aab50dd (patch) | |
tree | 1daab257bb3fe1ba659e294dc0fddff1a264eaa3 /bin | |
parent | d4bb209bab36e0f94fe2946a4fd5e7c585cf5624 (diff) | |
download | hdf5-f91c5aa11c60433b9f8a7f05e48fd6d89aab50dd.zip hdf5-f91c5aa11c60433b9f8a7f05e48fd6d89aab50dd.tar.gz hdf5-f91c5aa11c60433b9f8a7f05e48fd6d89aab50dd.tar.bz2 |
[svn-r12546] Added code to try harder to locate the MANIFEST file in more locations.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/chkmanifest | 19 |
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. |