From 007b77f81007e4e3122e8a0fbd22b2051152855a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 5 Sep 2021 00:08:19 +0100 Subject: [PATCH] more logic --- lgsm/functions/check_deps.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index d67e51fb3..1881b4a04 100755 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -324,11 +324,13 @@ info_distro.sh if [ ! -f "${tmpdir}/dependency-no-check.tmp" ]&&[ ! -f "${datadir}/${distroid}-${distroversion}.csv" ]; then # Check that the disto dependency csv file exists. fn_check_file_github "lgsm/data" "${distroid}-${distroversion}.csv" + if [ -n "${checkflag}" ]&&[ "${checkflag}" == "0" ]; then + fn_fetch_file_github "lgsm/data" "${distroid}-${distroversion}.csv" "lgsm/data" "chmodx" "norun" "noforce" "nohash" + fi fi # If the file successfully downloaded run the dependency check. -if [ -f "${datadir}/${distroid}-${distroversion}.csv" ]||[ -n "${checkflag}" ]&&[ "${checkflag}" == "0" ]; then - fn_fetch_file_github "lgsm/data" "${distroid}-${distroversion}.csv" "lgsm/data" "chmodx" "norun" "noforce" "nohash" +if [ -f "${datadir}/${distroid}-${distroversion}.csv" ]; then dependencyinstall=$(awk -F, '$1=="install" {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv") dependencyall=$(awk -F, '$1=="all" {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv") dependencyshortname=$(awk -v shortname="$shortname" -F, '$1==shortname {$1=""; print $0}' "${datadir}/${distroid}-${distroversion}.csv")