git: add workflow for auto mirroring git.yzbruh.space/YZBruh/pmt-renovated.

This commit is contained in:
2025-11-24 19:09:25 +03:00
parent ea7bbc254e
commit f30f733c73
2 changed files with 32 additions and 14 deletions

View File

@@ -19,8 +19,7 @@ RELEASE="20250821"
echo() { command echo "[$THIS]: $@"; }
checks()
{
checks() {
if ! curl "https://github.com" &>/dev/null; then
echo "No internet connection!"
exit 1
@@ -32,8 +31,7 @@ checks()
[ ! -f $PREFIX/bin/wget ] && pkg install -y wget
}
select_variant()
{
select_variant() {
LINK=""; ARCH=""; VARIANT=""
if getprop ro.product.cpu.abi | grep "arm64-v8a" &>/dev/null; then ARCH="arm64-v8a"
@@ -44,8 +42,7 @@ select_variant()
LINK="https://github.com/ShawkTeam/pmt-renovated/releases/download/${RELEASE}/pmt-${VARIANT}${ARCH}.zip"
}
download()
{
download() {
echo "Downloading pmt-${VARIANT}${ARCH}.zip (${RELEASE})"
if ! wget -O $PREFIX/tmp/pmt.zip "${LINK}" &>/dev/null; then
echo "Download failed! LINK=${LINK}"
@@ -60,8 +57,7 @@ download()
fi
}
setup()
{
setup() {
[ -f $PREFIX/tmp/pmt_static ] && mv $PREFIX/tmp/pmt_static $PREFIX/tmp/pmt
set -e
install -t $PREFIX/bin $PREFIX/tmp/pmt
@@ -72,21 +68,18 @@ setup()
echo "Installed successfully. Try running 'pmt' command."
}
uninstall()
{
uninstall() {
rm -f $PREFIX/bin/pmt $PREFIX/lib/libhelper* $PREFIX/lib/libpartition_map* &>/dev/null
}
is_installed()
{
is_installed() {
if /system/bin/which pmt &>/dev/null; then
echo "PMT is already installed."
exit 1
fi
}
cleanup()
{
cleanup() {
rm -f $PREFIX/tmp/pmt* $PREFIX/tmp/lib* $PREFIX/tmp/*.zip &>/dev/null
}