From 277641529d8752e58e5fd66febfe5931b865ba7e Mon Sep 17 00:00:00 2001 From: Observer of Time Date: Wed, 8 Apr 2020 15:16:18 +0000 Subject: [PATCH] Use VERCODE to specify the package version --- patch.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/patch.sh b/patch.sh index b49512b..73ccb2d 100755 --- a/patch.sh +++ b/patch.sh @@ -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 \ No newline at end of file