update build-termux.sh

This commit is contained in:
j-hc 2023-02-28 14:48:51 +03:00
parent 94006b2aa6
commit 6e4e6156ad
No known key found for this signature in database
GPG Key ID: FCBF5E9C57092AD9

View File

@ -19,29 +19,29 @@ ask() {
return 1 return 1
} }
if [ ! -f "$(date '+%Y%m%d')" ]; then
pr "Setting up environment..." pr "Setting up environment..."
yes "" | pkg update -y && pkg install -y git wget openssl jq openjdk-17 zip yes "" | pkg update -y && pkg install -y git wget openssl jq openjdk-17 zip
: >"$(date '+%Y%m%d')"
fi
pr "Cloning revanced-magisk-module repository..." pr "Cloning revanced-magisk-module repository..."
if [ -d revanced-magisk-module ]; then if [ -d revanced-magisk-module ]; then
if ask "Directory revanced-magisk-module already exists. Do you want to clone the repo again and overwrite your config? [y/n]"; then cd revanced-magisk-module
rm -rf revanced-magisk-module git fetch
git clone https://github.com/j-hc/revanced-magisk-module --recurse --depth 1 git rebase -X ours
sed -i '/^enabled.*/d; /^\[.*\]/a enabled = false' revanced-magisk-module/config.toml elif [ -f build.sh ]; then
fi git fetch
git rebase -X ours
else else
git clone https://github.com/j-hc/revanced-magisk-module --recurse --depth 1 git clone https://github.com/j-hc/revanced-magisk-module --recurse --depth 1
sed -i '/^enabled.*/d; /^\[.*\]/a enabled = false' revanced-magisk-module/config.toml sed -i '/^enabled.*/d; /^\[.*\]/a enabled = false' revanced-magisk-module/config.toml
fi
if [ ! -f build.sh ]; then
cd revanced-magisk-module cd revanced-magisk-module
fi fi
if ask "Do you want to open the config.toml for customizations? [y/n]"; then if ask "Do you want to open the config.toml for customizations? [y/n]"; then
nano config.toml nano config.toml
else git add config.toml && git commit -m config || :
pr "No app is selected for patching!"
fi fi
if ! ask "Setup is done. Do you want to start building? [y/n]"; then if ! ask "Setup is done. Do you want to start building? [y/n]"; then
exit 0 exit 0