mirror of
https://github.com/SinTan1729/ReVancedBuilder.git
synced 2024-12-25 20:28:37 -06:00
fix: When starting from scratch
This commit is contained in:
parent
f27d503105
commit
86c29d9b6d
2 changed files with 3 additions and 3 deletions
|
@ -114,7 +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
|
||||
[[ "$version_present" == "null" ]] && 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
|
||||
|
|
|
@ -142,8 +142,8 @@ for apk in "${!apks[@]}"; do
|
|||
done
|
||||
|
||||
version_present=$(jq -r ".\"$apk\"" versions.json)
|
||||
[ -z "$version_present" ] && version_present=0
|
||||
[[ -z "$version_present" || "$version" == "null" ]] && version_present=0
|
||||
[[ "$version" == "0" ]] && version=latest
|
||||
|
||||
[[ $(ver_less_than $version_present $version) == true || ! -f $apk.apk || $2 == force ]] && ${apks[$apk]} || echo "Recommended version ($version_present) of "$apk" is already present"
|
||||
[[ $(ver_less_than $version_present $version) || ! -f $apk.apk || $2 == force ]] && ${apks[$apk]} || echo "Recommended version ($version_present) of "$apk" is already present"
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue