Only download patches once

This commit is contained in:
Sayantan Santra 2022-10-12 20:05:25 -05:00
parent 138e99f791
commit b13a85e7dc

View file

@ -89,11 +89,10 @@ else
fi fi
## Main ## Main
req "https://raw.githubusercontent.com/revanced/revanced-patches/main/patches.json" patches.json
for apk in "${!apks[@]}"; do for apk in "${!apks[@]}"; do
if [ ! -f $apk ]; then if [ ! -f $apk ]; then
echo "Downloading $apk" | tee -a build.log echo "Downloading $apk" | tee -a build.log
req "https://raw.githubusercontent.com/revanced/revanced-patches/main/patches.json" patches.json
supported_vers="$(jq -r '.[].compatiblePackages[] | select(.name == "'$apk'") | .versions | last' patches.json)" supported_vers="$(jq -r '.[].compatiblePackages[] | select(.name == "'$apk'") | .versions | last' patches.json)"
version=0 version=0
for vers in $supported_vers; do for vers in $supported_vers; do