Skip to content

Commit 534e43e

Browse files
authored
fix(install): rhel based distros now get correct csv file (#3576)
1 parent 9692c81 commit 534e43e

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

lgsm/functions/check_deps.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -300,22 +300,24 @@ info_distro.sh
300300

301301
# some RHEL based distros use 8.4 instead of just 8.
302302
if [[ "${distroidlike}" == *"rhel"* ]]||[ "${distroid}" == "rhel" ]; then
303-
distroversion="${distroversionrh}"
303+
distroversioncsv="${distroversionrh}"
304+
else
305+
distroversioncsv="${distroversion}"
304306
fi
305307

306-
if [ ! -f "${tmpdir}/dependency-no-check.tmp" ]&&[ ! -f "${datadir}/${distroid}-${distroversion}.csv" ]; then
308+
if [ ! -f "${tmpdir}/dependency-no-check.tmp" ]&&[ ! -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
307309
# Check that the disto dependency csv file exists.
308-
fn_check_file_github "lgsm/data" "${distroid}-${distroversion}.csv"
310+
fn_check_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv"
309311
if [ -n "${checkflag}" ]&&[ "${checkflag}" == "0" ]; then
310-
fn_fetch_file_github "lgsm/data" "${distroid}-${distroversion}.csv" "lgsm/data" "chmodx" "norun" "noforce" "nohash"
312+
fn_fetch_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" "lgsm/data" "chmodx" "norun" "noforce" "nohash"
311313
fi
312314
fi
313315

314316
# If the file successfully downloaded run the dependency check.
315-
if [ -f "${datadir}/${distroid}-${distroversion}.csv" ]; then
316-
depall=$(awk -F, '$1=="all" {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv")
317-
depsteamcmd=$(awk -F, '$1=="steamcmd" {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv")
318-
depshortname=$(awk -v shortname="$shortname" -F, '$1==shortname {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv")
317+
if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
318+
depall=$(awk -F, '$1=="all" {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv")
319+
depsteamcmd=$(awk -F, '$1=="steamcmd" {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv")
320+
depshortname=$(awk -v shortname="$shortname" -F, '$1==shortname {$1=""; print $0}' "${datadir}/${distroid}-${distroversioncsv}.csv")
319321

320322
# Generate array of missing deps.
321323
array_deps_missing=()

0 commit comments

Comments
 (0)