mirror of
https://github.com/SinTan1729/ReVancedBuilder.git
synced 2024-12-26 12:48:36 -06:00
fix: The case with no versions present
This commit is contained in:
parent
4b3551fc51
commit
c0c01663df
1 changed files with 1 additions and 0 deletions
|
@ -114,6 +114,7 @@ if [[ $2 != buildonly ]]; then
|
||||||
basename=$(echo $repo | cut -d '/' -f2)
|
basename=$(echo $repo | cut -d '/' -f2)
|
||||||
echo "Checking $basename"
|
echo "Checking $basename"
|
||||||
version_present=$(jq -r ".\"$basename\"" versions.json)
|
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)"
|
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')
|
[[ $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
|
if [[ $(ver_less_than $version_present $version) == true || ! -f $name || $2 == force ]]; then
|
||||||
|
|
Loading…
Reference in a new issue