From 2a705b71bae373da42fd8c31974a546e3c1bfb8a Mon Sep 17 00:00:00 2001 From: H3o66 Date: Mon, 10 Jan 2022 21:23:18 +0100 Subject: [PATCH] refactor(core): move curl check to main file --- lgsm/functions/core_dl.sh | 6 ------ linuxgsm.sh | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 5abfdfbb3..297f4101f 100755 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -597,9 +597,3 @@ fn_dl_latest_release_github(){ fi fi } - -# Check that curl is installed -if [ ! "$(command -v curl 2>/dev/null)" ]; then - echo -e "[ FAIL ] Curl is not installed" - exit 1 -fi diff --git a/linuxgsm.sh b/linuxgsm.sh index 76edddfa3..6eb3f0beb 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -51,6 +51,12 @@ githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="master" +# Check that curl is installed before doing anything +if [ ! "$(command -v curl 2>/dev/null)" ]; then + echo -e "[ FAIL ] Curl is not installed" + exit 1 +fi + # Core function that is required first. core_functions.sh(){ functionfile="${FUNCNAME[0]}"