Don't attempt every WML test if binary missing

This commit is contained in:
Celtic Minstrel 2016-03-30 16:10:17 -04:00
parent 249792e08d
commit 94d3d5aec6

View file

@ -274,6 +274,19 @@ shift $(($OPTIND - 1))
extra_opts+="$*"
# Make sure the binary exists
if [ "$DebugMode" -eq 1 ]; then
if [ "! ( -f $BinPath/wesnoth-debug -a -x $BinPath/wesnoth-debug )" ]; then
echo "Wesnoth binary not found at $BinPath/wesnoth-debug"
exit 1
fi
else
if [ "! ( -f $BinPath/wesnoth -a -x $BinPath/wesnoth )" ]; then
echo "Wesnoth binary not found at $BinPath/wesnoth"
exit 1
fi
fi
if [ "$Verbose" -ge 2 ]; then
if [ "${#extra_opts}" -ge 0 ]; then
echo "Found additional arguments to wesnoth: " "$extra_opts"