update build-termux.sh

This commit is contained in:
j-hc 2023-03-05 15:22:43 +03:00
parent 9eb353a50a
commit 179ff52d46
No known key found for this signature in database
GPG Key ID: FCBF5E9C57092AD9
3 changed files with 18 additions and 11 deletions

View File

@ -5,6 +5,8 @@
[![Build Modules](https://github.com/j-hc/revanced-magisk-module/actions/workflows/build.yml/badge.svg)](https://github.com/j-hc/revanced-magisk-module/actions/workflows/build.yml)
[![CI](https://github.com/j-hc/revanced-magisk-module/actions/workflows/ci.yml/badge.svg?event=schedule)](https://github.com/j-hc/revanced-magisk-module/actions/workflows/ci.yml)
Extensive ReVanced builder
Get the [latest CI release](https://github.com/j-hc/revanced-magisk-module/releases).
[**mindetach module**](https://github.com/j-hc/mindetach-magisk) in the releases section detaches YouTube and YouTube Music from Play Store and blocks it from updating them.

View File

@ -25,23 +25,28 @@ if [ ! -f ~/.rvmm_"$(date '+%Y%m')" ]; then
: >~/.rvmm_"$(date '+%Y%m')"
fi
pr "Cloning revanced-magisk-module repository..."
if [ -f build.sh ]; then cd ..; fi
if [ -d revanced-magisk-module ]; then
cd revanced-magisk-module
git fetch
git rebase -X ours
elif [ -f build.sh ]; then
git fetch
git rebase -X ours
else
pr "Checking for revanced-magisk-module updates"
git -C revanced-magisk-module fetch
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 .
rm -rf revanced-magisk-module
git clone https://github.com/j-hc/revanced-magisk-module --recurse --depth 1
cd revanced-magisk-module
sed -i '/^enabled.*/d; /^\[.*\]/a enabled = false' config.toml
mv -f config.toml revanced-magisk-module/config.toml
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
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
git add config.toml && git -c user.name='rvmm' -c user.email='' commit -m config || :
fi
if ! ask "Setup is done. Do you want to start building? [y/n]"; then
exit 0

View File

@ -311,7 +311,7 @@ build_rv() {
apkm_arch="armeabi-v7a"
fi
if ! dl_apkmirror "${args[apkmirror_dlurl]}" "$version" "$stock_apk" APK "$apkm_arch" "${args[dpi]}"; then
epr "ERROR: Could not find any release of '${app_name}' with version '${version}' and arch '${apkm_arch}' from APKMirror"
epr "ERROR: Could not find any release of '${app_name}' with version '${version}', arch '${apkm_arch}' and dpi '${args[dpi]}' from APKMirror"
return 0
fi
elif [ "$dl_from" = uptodown ]; then