mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2025-01-07 03:26:50 +08:00
feat: add extra checks to fail if jq is not installed
This commit is contained in:
parent
9495437a84
commit
a32d590329
@ -54,7 +54,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do
|
||||
fi
|
||||
done
|
||||
|
||||
allowed_commands_array=(BACKUP DEBUG START)
|
||||
allowed_commands_array=(BACKUP DEBUG DETAILS START UPDATE)
|
||||
for allowed_command in "${allowed_commands_array[@]}"; do
|
||||
if [ "${allowed_command}" == "${commandname}" ]; then
|
||||
check_deps.sh
|
||||
|
@ -152,6 +152,12 @@ fn_update_compare() {
|
||||
# The location where the builds are checked and downloaded.
|
||||
remotelocation="github.com"
|
||||
|
||||
if [ "$(command -v jq 2> /dev/null)" ]; then
|
||||
fn_print_fail_nl "jq is not installed"
|
||||
fn_script_log_fatal "jq is not installed"
|
||||
core_exit.sh
|
||||
fi
|
||||
|
||||
if [ "${firstcommandname}" == "INSTALL" ]; then
|
||||
fn_update_remotebuild
|
||||
fn_update_dl
|
||||
|
@ -167,6 +167,12 @@ fn_update_compare() {
|
||||
# The location where the builds are checked and downloaded.
|
||||
remotelocation="mojang.com"
|
||||
|
||||
if [ "$(command -v jq 2> /dev/null)" ]; then
|
||||
fn_print_fail_nl "jq is not installed"
|
||||
fn_script_log_fatal "jq is not installed"
|
||||
core_exit.sh
|
||||
fi
|
||||
|
||||
if [ "${firstcommandname}" == "INSTALL" ]; then
|
||||
fn_update_remotebuild
|
||||
fn_update_dl
|
||||
|
@ -175,6 +175,12 @@ fn_update_compare() {
|
||||
# The location where the builds are checked and downloaded.
|
||||
remotelocation="minecraft.net"
|
||||
|
||||
if [ "$(command -v jq 2> /dev/null)" ]; then
|
||||
fn_print_fail_nl "jq is not installed"
|
||||
fn_script_log_fatal "jq is not installed"
|
||||
core_exit.sh
|
||||
fi
|
||||
|
||||
if [ "${firstcommandname}" == "INSTALL" ]; then
|
||||
fn_update_remotebuild
|
||||
fn_update_dl
|
||||
|
@ -160,6 +160,12 @@ fn_update_compare() {
|
||||
# The location where the builds are checked and downloaded.
|
||||
remotelocation="linux.mtasa.com"
|
||||
|
||||
if [ "$(command -v jq 2> /dev/null)" ]; then
|
||||
fn_print_fail_nl "jq is not installed"
|
||||
fn_script_log_fatal "jq is not installed"
|
||||
core_exit.sh
|
||||
fi
|
||||
|
||||
if [ "${firstcommandname}" == "INSTALL" ]; then
|
||||
fn_update_remotebuild
|
||||
fn_update_dl
|
||||
|
@ -177,6 +177,12 @@ fn_update_compare() {
|
||||
# The location where the builds are checked and downloaded.
|
||||
remotelocation="papermc.io"
|
||||
|
||||
if [ "$(command -v jq 2> /dev/null)" ]; then
|
||||
fn_print_fail_nl "jq is not installed"
|
||||
fn_script_log_fatal "jq is not installed"
|
||||
core_exit.sh
|
||||
fi
|
||||
|
||||
if [ "${shortname}" == "pmc" ]; then
|
||||
paperproject="paper"
|
||||
elif [ "${shortname}" == "vpmc" ]; then
|
||||
|
@ -171,6 +171,12 @@ fi
|
||||
# The location where the builds are checked and downloaded.
|
||||
remotelocation="teamspeak.com"
|
||||
|
||||
if [ "$(command -v jq 2> /dev/null)" ]; then
|
||||
fn_print_fail_nl "jq is not installed"
|
||||
fn_script_log_fatal "jq is not installed"
|
||||
core_exit.sh
|
||||
fi
|
||||
|
||||
if [ "${firstcommandname}" == "INSTALL" ]; then
|
||||
fn_update_remotebuild
|
||||
fn_update_dl
|
||||
|
@ -153,6 +153,12 @@ fn_update_compare() {
|
||||
# The location where the builds are checked and downloaded.
|
||||
remotelocation="github.com"
|
||||
|
||||
if [ "$(command -v jq 2> /dev/null)" ]; then
|
||||
fn_print_fail_nl "jq is not installed"
|
||||
fn_script_log_fatal "jq is not installed"
|
||||
core_exit.sh
|
||||
fi
|
||||
|
||||
if [ "${firstcommandname}" == "INSTALL" ]; then
|
||||
fn_update_remotebuild
|
||||
fn_update_dl
|
||||
|
@ -160,6 +160,12 @@ fn_update_compare() {
|
||||
# The location where the builds are checked and downloaded.
|
||||
remotelocation="vintagestory.at"
|
||||
|
||||
if [ "$(command -v jq 2> /dev/null)" ]; then
|
||||
fn_print_fail_nl "jq is not installed"
|
||||
fn_script_log_fatal "jq is not installed"
|
||||
core_exit.sh
|
||||
fi
|
||||
|
||||
if [ "${firstcommandname}" == "INSTALL" ]; then
|
||||
fn_update_remotebuild
|
||||
fn_update_dl
|
||||
|
@ -160,6 +160,12 @@ fn_update_compare() {
|
||||
# The location where the builds are checked and downloaded.
|
||||
remotelocation="github.com"
|
||||
|
||||
if [ "$(command -v jq 2> /dev/null)" ]; then
|
||||
fn_print_fail_nl "jq is not installed"
|
||||
fn_script_log_fatal "jq is not installed"
|
||||
core_exit.sh
|
||||
fi
|
||||
|
||||
if [ "${firstcommandname}" == "INSTALL" ]; then
|
||||
fn_update_remotebuild
|
||||
fn_update_dl
|
||||
|
Loading…
Reference in New Issue
Block a user