Update install-termux.sh

This commit is contained in:
2024-06-17 00:13:30 +03:00
committed by GitHub
parent 3976e0fb39
commit d2cb68df5e

View File

@@ -5,23 +5,28 @@
set -e set -e
VERSION="2.1.0"
REL_LINK="https://github.com/YZBruh/pbt/releases/download/${VERSION}/pmt-${ARCH}-linux-android.xz"
CUR_DIR="$(pwd)"
TMP_DIR="${CUR_DIR}/tempinstall"
TERMUX_BIN_PREFIX="/data/data/com.termux/files/usr/bin"
UNAME="$(uname -m)" UNAME="$(uname -m)"
abort()
{
rm -rf ${TMP_DIR}
exit 1;
}
if [[ "${UNAME}" == "aarch64" ]] || [[ "${UNAME}" == "armv8a" ]]; then if [[ "${UNAME}" == "aarch64" ]] || [[ "${UNAME}" == "armv8a" ]]; then
ARCH="aarch64" ARCH="aarch64"
elif [[ "${UNAME}" == "aarch32" ]] || [[ "${UNAME}" == "armv7a" ]]; then elif [[ "${UNAME}" == "aarch32" ]] || [[ "${UNAME}" == "armv7a" ]]; then
ARCH="armv7a" ARCH="armv7a"
else else
echo " - Unsupported arch: ${UNAME}!" echo " - Unsupported arch: ${UNAME}!"
exit 1 abort
fi fi
VERSION="2.1.0"
REL_LINK="https://github.com/YZBruh/pbt/releases/download/${VERSION}/pmt-${ARCH}-linux-android.xz"
CUR_DIR="$(pwd)"
TMP_DIR="${CUR_DIR}/tempinstall"
TERMUX_BIN_PREFIX="/data/data/com.termux/files/usr/bin"
echo " ------------ pmt installer ------------" echo " ------------ pmt installer ------------"
if [ -f "${TERMUX_BIN_PREFIX}/pmt" ]; then if [ -f "${TERMUX_BIN_PREFIX}/pmt" ]; then
@@ -34,7 +39,7 @@ if [ -f "${TERMUX_BIN_PREFIX}/pmt" ]; then
exit exit
else else
echo "${0}: unexpected: ${state}" echo "${0}: unexpected: ${state}"
exit 1 abort
fi fi
fi fi