Fix problem about exclude, include patches not working
This commit is contained in:
Fioren
2023-11-08 02:44:55 +07:00
committed by GitHub
parent 040a520f02
commit 1c9bc553d3

View File

@@ -21,14 +21,16 @@ echo "All assets downloaded"
# Get patches list: # Get patches list:
get_patches_key() { get_patches_key() {
EXCLUDE_PATCHES=() excludePatches=""
for word in $(cat src/patches/$1/exclude-patches) ; do includePatches=""
EXCLUDE_PATCHES+=("-e $word") while IFS= read -r line1; do
done excludePatches+=" -e \"$line1\""
INCLUDE_PATCHES=() done < src/patches/$1/exclude-patches
for word in $(cat src/patches/$1/include-patches) ; do export excludePatches
INCLUDE_PATCHES+=("-i $word") while IFS= read -r line2; do
done includePatches+=" -i \"$line2\""
done < src/patches/$1/include-patches
export includePatches
} }
################################################# #################################################
@@ -134,18 +136,18 @@ patch() {
exit 1 exit 1
fi fi
fi fi
java -jar revanced-cli*.jar $p\ eval java -jar revanced-cli*.jar $p\
$b revanced-patches*.jar \ $b revanced-patches*.jar \
$m revanced-integrations*.apk \ $m revanced-integrations*.apk\
${EXCLUDE_PATCHES[@]} \ $excludePatches\
${INCLUDE_PATCHES[@]} \ $includePatches \
--options=./src/options/$2.json \ --options=./src/options/$2.json \
--out=./release/$1-$2.apk \ --out=./release/$1-$2.apk \
--keystore=./src/$ks.keystore \ --keystore=./src/$ks.keystore \
$a$1.apk $a$1.apk
unset version unset version
unset EXCLUDE_PATCHES unset excludePatches
unset INCLUDE_PATCHES unset includePatches
else else
exit 1 exit 1
fi fi