From 530786a7e8d333358f25a9c6f306537ac83b9b08 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Thu, 27 Jul 2023 15:40:15 -0500 Subject: [PATCH] fix: Handle when no version is present --- download_apkmirror.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/download_apkmirror.sh b/download_apkmirror.sh index 3b58bb2..cc213ce 100755 --- a/download_apkmirror.sh +++ b/download_apkmirror.sh @@ -131,5 +131,6 @@ for apk in "${!apks[@]}"; do [ $vers != "null" ] && [[ $(ver_less_than $vers $version) == true || $version == 0 ]] && version=$vers done version_present=$(jq -r ".\"$apk\"" versions.json) + [ -z "$version_present" ] && version_present=0 [[ $(ver_less_than $version_present $version) == true || ! -f $apk.apk || $2 == force ]] && ${apks[$apk]} || echo "Recommended version ($version_present) of "$apk" is already present" done