mirror of https://github.com/ecmwf/eccodes.git
ECC-205: set correct exit status
This commit is contained in:
parent
9ba0977084
commit
ce478aa81c
|
@ -53,6 +53,7 @@ for i in "$@" ; do
|
||||||
done
|
done
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
|
# set -x
|
||||||
if [ $is_emoslib -eq 1 ]; then
|
if [ $is_emoslib -eq 1 ]; then
|
||||||
pkg=emoslib
|
pkg=emoslib
|
||||||
tool=$EMOSLIB_TOOL
|
tool=$EMOSLIB_TOOL
|
||||||
|
@ -62,10 +63,10 @@ else
|
||||||
tool=$ECCODES_TOOL
|
tool=$ECCODES_TOOL
|
||||||
try_tool $tool
|
try_tool $tool
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $result -eq $ERR_TOOL_NOT_FOUND ]; 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
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
exit $result
|
||||||
|
|
Loading…
Reference in New Issue