Use VERCODE to specify the package version
This commit is contained in:
parent
a4a02109af
commit
277641529d
6
patch.sh
6
patch.sh
|
@ -17,6 +17,10 @@ set -euo pipefail
|
||||||
|
|
||||||
URL='https://ws75.aptoide.com/api/7/app/getMeta?package_name=com.discord'
|
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\":\"([^\"]+)\" ]]
|
[[ $(curl -Ssf "$URL") =~ \"vercode\":([0-9]+),.*\"path\":\"([^\"]+)\" ]]
|
||||||
|
|
||||||
discord="com.discord-${BASH_REMATCH[1]}"
|
discord="com.discord-${BASH_REMATCH[1]}"
|
||||||
|
@ -68,4 +72,4 @@ do :; done
|
||||||
if [[ -z ${SKIP_INSTALL+x} ]]; then
|
if [[ -z ${SKIP_INSTALL+x} ]]; then
|
||||||
adb install -r "$discord/dist/$discord.apk"
|
adb install -r "$discord/dist/$discord.apk"
|
||||||
rm -rf "$discord" "$discord.apk" cutthecord
|
rm -rf "$discord" "$discord.apk" cutthecord
|
||||||
fi
|
fi
|
Reference in New Issue