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