Update utils.sh

This commit is contained in:
Fioren
2024-12-16 16:59:18 +07:00
committed by GitHub
parent 69ced21d8d
commit d5a4c63341

View File

@@ -234,13 +234,13 @@ patch() {
if [ -f "./download/$1.apk" ]; then if [ -f "./download/$1.apk" ]; then
local p b m ks a pu opt local p b m ks a pu opt
if [ "$3" = inotia ]; then if [ "$3" = inotia ]; then
p="patch " b="-p *.rvp" m="" a="" ks="_ks" pu="--purge=true" opt="" p="patch " b="-p *.rvp" m="" a="" ks="_ks" pu="--purge=true" opt="--legacy-options=./src/options/$2.json"
echo "Patching with Revanced-cli inotia" echo "Patching with Revanced-cli inotia"
else else
if [[ $(ls revanced-cli-*.jar) =~ revanced-cli-([0-9]+) ]]; then if [[ $(ls revanced-cli-*.jar) =~ revanced-cli-([0-9]+) ]]; then
num=${BASH_REMATCH[1]} num=${BASH_REMATCH[1]}
if [ $num -ge 5 ]; then if [ $num -ge 5 ]; then
p="patch " b="-p *.rvp" m="" a="" ks="ks" pu="--purge=true" opt="--legacy-options=./src/options/$2.json" p="patch " b="-p *.rvp" m="" a="" ks="ks" pu="--purge=true" opt=""
echo "Patching with Revanced-cli version 5+" echo "Patching with Revanced-cli version 5+"
elif [ $num -eq 4 ]; then elif [ $num -eq 4 ]; then
p="patch " b="--patch-bundle *patch*.jar" m="--merge *integration*.apk " a="" ks="ks" pu="--purge=true" opt="--options=./src/options/$2.json " p="patch " b="--patch-bundle *patch*.jar" m="--merge *integration*.apk " a="" ks="ks" pu="--purge=true" opt="--options=./src/options/$2.json "