fix: The case with no versions present

This commit is contained in:
Sayantan Santra 2023-07-27 15:35:02 -05:00
parent 4b3551fc51
commit c0c01663df
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F

View file

@ -114,6 +114,7 @@ if [[ $2 != buildonly ]]; then
basename=$(echo $repo | cut -d '/' -f2)
echo "Checking $basename"
version_present=$(jq -r ".\"$basename\"" versions.json)
[ -z "$version_present" ] && version_present=0
data="$(jq -r ".tools[] | select((.repository == \"$repo\") and (.content_type | contains(\"archive\")))" latest_versions.json)"
[[ $name == microg.apk ]] && version=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | jq -r '.tag_name') || version=$(echo "$data" | jq -r '.version')
if [[ $(ver_less_than $version_present $version) == true || ! -f $name || $2 == force ]]; then