--- MITgcm/verification/testreport 2003/10/09 04:19:20 1.10 +++ MITgcm/verification/testreport 2003/10/10 03:29:44 1.11 @@ -1,6 +1,7 @@ #!/bin/bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.10 2003/10/09 04:19:20 edhill Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.11 2003/10/10 03:29:44 edhill Exp $ +# $Name: $ # usage() @@ -583,9 +584,21 @@ NDIR=0 +of_path= if test "x$OPTFILE" != xNONE ; then if test -r $OPTFILE ; then - OPTFILE=`pwd`"/$OPTFILE" + # get the path + path=${OPTFILE%/*} + if test "x$path" = x ; then + of_path=`pwd` + else + of_path=`( cd $path > /dev/null 2>&1 ; pwd )` + fi + file=${OPTFILE##*/} + OPTFILE=$of_path/$file + else + echo + echo "WARNING: can't read OPTFILE=\"$OPTFILE\" but will try to use it..." fi fi echo