feat: add extra checks to fail if jq is not installed

This commit is contained in:
Daniel Gibbs 2025-01-05 00:15:18 +00:00
parent 9495437a84
commit a32d590329
10 changed files with 55 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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