mirror of https://github.com/ecmwf/eccodes.git
ECC-205: cleanup
This commit is contained in:
parent
2eef90abcc
commit
9ba0977084
|
@ -1,5 +1,4 @@
|
|||
#!/bin/sh
|
||||
#set -x
|
||||
|
||||
script_dir=`dirname $0`
|
||||
EMOSLIB_TOOL=emoslib_bufr_filter
|
||||
|
@ -40,23 +39,16 @@ if [ $# -eq 0 ]; then
|
|||
try_tool $ECCODES_TOOL
|
||||
if [ $result -eq $ERR_TOOL_NOT_FOUND ]; then
|
||||
try_tool $EMOSLIB_TOOL
|
||||
#if [ $? -ne 0 ]; then
|
||||
# echo "ERROR: Found neither $ECCODES_TOOL nor $EMOSLIB_TOOL" 2>&1
|
||||
# exit 1
|
||||
#fi
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Now process arguments
|
||||
# Now process arguments. The "-i" switch is specific to emoslib
|
||||
args="$@"
|
||||
for i in "$@" ; do
|
||||
case $i in
|
||||
-i)
|
||||
is_emoslib=1;
|
||||
shift ;;
|
||||
*)
|
||||
shift ;;
|
||||
-i) is_emoslib=1; shift ;;
|
||||
*) shift ;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
@ -65,15 +57,13 @@ if [ $is_emoslib -eq 1 ]; then
|
|||
pkg=emoslib
|
||||
tool=$EMOSLIB_TOOL
|
||||
try_tool $tool
|
||||
retval=$?
|
||||
else
|
||||
pkg=ecCodes
|
||||
tool=$ECCODES_TOOL
|
||||
try_tool $tool
|
||||
retval=$?
|
||||
fi
|
||||
|
||||
if [ $retval -ne 0 ]; then
|
||||
if [ $result -eq $ERR_TOOL_NOT_FOUND ]; then
|
||||
echo "ERROR: Could not find the executable: $tool. Aborting!" 2>&1
|
||||
echo " The arguments you passed in are relevant to $pkg" 2>&1
|
||||
echo " Please make sure you have $pkg installed in your path" 2>&1
|
||||
|
|
Loading…
Reference in New Issue