From 534e43e3727cd9ec4f8c828c8fc2f32d2e244db3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 27 Sep 2021 23:28:26 +0100 Subject: [PATCH] fix(install): rhel based distros now get correct csv file (#3576) --- lgsm/functions/check_deps.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 3e3d6a1b6..e5f5aead2 100755 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -300,22 +300,24 @@ info_distro.sh # some RHEL based distros use 8.4 instead of just 8. if [[ "${distroidlike}" == *"rhel"* ]]||[ "${distroid}" == "rhel" ]; then - distroversion="${distroversionrh}" + distroversioncsv="${distroversionrh}" +else + distroversioncsv="${distroversion}" fi -if [ ! -f "${tmpdir}/dependency-no-check.tmp" ]&&[ ! -f "${datadir}/${distroid}-${distroversion}.csv" ]; then +if [ ! -f "${tmpdir}/dependency-no-check.tmp" ]&&[ ! -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then # Check that the disto dependency csv file exists. - fn_check_file_github "lgsm/data" "${distroid}-${distroversion}.csv" + fn_check_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" if [ -n "${checkflag}" ]&&[ "${checkflag}" == "0" ]; then - fn_fetch_file_github "lgsm/data" "${distroid}-${distroversion}.csv" "lgsm/data" "chmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" "lgsm/data" "chmodx" "norun" "noforce" "nohash" fi fi # If the file successfully downloaded run the dependency check. -if [ -f "${datadir}/${distroid}-${distroversion}.csv" ]; then - depall=$(awk -F, '$1=="all" {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv") - depsteamcmd=$(awk -F, '$1=="steamcmd" {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv") - depshortname=$(awk -v shortname="$shortname" -F, '$1==shortname {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv") +if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then + depall=$(awk -F, '$1=="all" {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") + depsteamcmd=$(awk -F, '$1=="steamcmd" {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") + depshortname=$(awk -v shortname="$shortname" -F, '$1==shortname {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv") # Generate array of missing deps. array_deps_missing=()