From 6e698afb050ff6c409d8b4ecb62c092ad2494024 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 13 Mar 2020 23:34:58 +0000 Subject: [PATCH] bypass apt install steamcmd if debian non-free repo is missing --- lgsm/functions/check_deps.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 28b2b593c..e3bc03634 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -327,7 +327,7 @@ fn_deps_build_debian(){ array_deps_missing=() # LinuxGSM requirements. - array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python3 tar bzip2 gzip unzip binutils bc jq tmux steamcmd ) + array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python3 tar bzip2 gzip unzip binutils bc jq tmux ) # All servers except ts3, mumble, GTA and minecraft servers require libstdc++6 and lib32gcc1. if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "mumble" ]&&[ "${shortname}" != "mc" ]&&[ "${engine}" != "renderware" ]; then @@ -337,6 +337,15 @@ fn_deps_build_debian(){ array_deps_required+=( lib32stdc++6 ) fi fi + # If requires steamcmd. + if [ "${appid}" ]; then + # Will not use apt if non-free repo is missing + if [ "${distroid}" == "debian" ]&& ! grep -qE "^deb .*non-free" /etc/apt/sources.list; then + : + else + array_deps_required+=( steamcmd ) + fi + fi # Game Specific requirements.