Use VERCODE to specify the package version

This commit is contained in:
Observer of Time 2020-04-08 15:16:18 +00:00
parent a4a02109af
commit 277641529d
1 changed files with 5 additions and 1 deletions

View File

@ -17,6 +17,10 @@ set -euo pipefail
URL='https://ws75.aptoide.com/api/7/app/getMeta?package_name=com.discord'
if [[ -n ${VERCODE+x} ]]; then
URL+="&max_vercode=$VERCODE"
fi
[[ $(curl -Ssf "$URL") =~ \"vercode\":([0-9]+),.*\"path\":\"([^\"]+)\" ]]
discord="com.discord-${BASH_REMATCH[1]}"
@ -68,4 +72,4 @@ do :; done
if [[ -z ${SKIP_INSTALL+x} ]]; then
adb install -r "$discord/dist/$discord.apk"
rm -rf "$discord" "$discord.apk" cutthecord
fi
fi