diff --git a/build-termux.sh b/build-termux.sh index 299e0cb..9604bbd 100755 --- a/build-termux.sh +++ b/build-termux.sh @@ -19,6 +19,8 @@ ask() { return 1 } +CFG=config.toml + if [ ! -f ~/.rvmm_"$(date '+%Y%m')" ]; then pr "Setting up environment..." yes "" | pkg update -y && pkg install -y openssl git wget jq openjdk-17 zip @@ -32,26 +34,29 @@ if [ -d revanced-magisk-module ]; then if git -C revanced-magisk-module status | grep -q 'is behind'; then pr "revanced-magisk-module already is not synced with upstream." pr "Cloning revanced-magisk-module. config.toml will be preserved." - cp -f revanced-magisk-module/config.toml . + cp -f revanced-magisk-module/config*toml . rm -rf revanced-magisk-module git clone https://github.com/j-hc/revanced-magisk-module --recurse --depth 1 - mv -f config.toml revanced-magisk-module/config.toml + mv -f config*toml revanced-magisk-module/ fi else pr "Cloning revanced-magisk-module." 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 cd revanced-magisk-module chmod +x build.sh build-termux.sh -if ask "Do you want to open the config.toml for customizations? [y/n]"; then - nano config.toml +if ! ask "Select config (y=revanced n=revanced extended)"; then + CFG=config-rv-ex.toml +fi +if ask "Do you want to open the config for customizations? [y/n]"; then + nano $CFG fi if ! ask "Setup is done. Do you want to start building? [y/n]"; then exit 0 fi -./build.sh +./build.sh $CFG cd build pr "Ask for storage permission"