Browse Source

feat: improve error message for unknown game server

The code changes modify the error message displayed when an unknown game server is entered. The new message now capitalizes the first letter of "unknown" and adds an exit status of 1 to terminate the script. This change affects multiple test files, including `tests_fctrserver.sh`, `tests_jc2server.sh`, `tests_mcserver.sh`, and `tests_ts3server.sh`.
pull/4218/head
Daniel Gibbs 2 years ago
parent
commit
4e06d4e43a
  1. 3
      linuxgsm.sh
  2. 2
      tests/tests_fctrserver.sh
  3. 2
      tests/tests_jc2server.sh
  4. 2
      tests/tests_mcserver.sh
  5. 2
      tests/tests_ts3server.sh

3
linuxgsm.sh

@ -369,7 +369,8 @@ if [ "${shortname}" == "core" ]; then
if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then
fn_install_file fn_install_file
else else
echo -e "[ FAIL ] unknown game server" echo -e "[ FAIL ] Unknown game server"
exit 1
fi fi
else else
fn_install_getopt fn_install_getopt

2
tests/tests_fctrserver.sh

@ -369,7 +369,7 @@ if [ "${shortname}" == "core" ]; then
if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then
fn_install_file fn_install_file
else else
echo -e "[ FAIL ] unknown game server" echo -e "[ FAIL ] Unknown game server"
fi fi
else else
fn_install_getopt fn_install_getopt

2
tests/tests_jc2server.sh

@ -370,7 +370,7 @@ if [ "${shortname}" == "core" ]; then
if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then
fn_install_file fn_install_file
else else
echo -e "[ FAIL ] unknown game server" echo -e "[ FAIL ] Unknown game server"
fi fi
else else
fn_install_getopt fn_install_getopt

2
tests/tests_mcserver.sh

@ -370,7 +370,7 @@ if [ "${shortname}" == "core" ]; then
if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then
fn_install_file fn_install_file
else else
echo -e "[ FAIL ] unknown game server" echo -e "[ FAIL ] Unknown game server"
fi fi
else else
fn_install_getopt fn_install_getopt

2
tests/tests_ts3server.sh

@ -370,7 +370,7 @@ if [ "${shortname}" == "core" ]; then
if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then
fn_install_file fn_install_file
else else
echo -e "[ FAIL ] unknown game server" echo -e "[ FAIL ] Unknown game server"
fi fi
else else
fn_install_getopt fn_install_getopt

Loading…
Cancel
Save