From f91c5aa11c60433b9f8a7f05e48fd6d89aab50dd Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Sun, 6 Aug 2006 02:44:48 -0500 Subject: [svn-r12546] Added code to try harder to locate the MANIFEST file in more locations. --- bin/chkmanifest | 19 ++++++++++++++++--- 1 file 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. -- cgit v0.12