Skip to content

Commit

Permalink
Termux-Install: Version 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
KrutosVIP committed Jul 17, 2022
1 parent b06ee4f commit 5d065b3
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Or, even more faster, just install deb from Releases, by using `dpkg -i <deb>`
> If you want to use termux bootstrap with pacman, replace all `termux` with `termux-pacman` <br/>
> Example: `termux-install64` -> `termux-pacman-install64` <br/>
> Also, you can install glibc by using command in 64-bit container (pacman-only), by using `termux-install-glibc` in container. <br/>
> More on this: https://github.com/Maxython/glibc-for-termux/
> More on this: https://github.com/Maxython/glibc-for-termux/ <br/>
> But keep in mind, the support is experimental. In case of errors, restart the script. If the error persists, create an issue. <br/>
To install 64-bit container:
```
Expand Down
2 changes: 1 addition & 1 deletion bin/termux-install32
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def check_integrity(file, sum):
if (not flag in ["-f", "-r"]) and (os.path.isdir(chroot_dir)):
print("ERROR: Chroot dir exists. Use flag -r if you want to reinstall chroot or use termux-remove32 to remove it")
sys.exit()
elif (flag == ["-r"]) and (os.path.isdir(chroot_dir)):
elif (flag == "-r") and (os.path.isdir(chroot_dir)):
shutil.rmtree(chroot_dir)

# Select arch
Expand Down
2 changes: 1 addition & 1 deletion bin/termux-install64
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def check_integrity(file, sum):
if (not flag in ["-f", "-r"]) and (os.path.isdir(chroot_dir)):
print("ERROR: Chroot dir exists. Use flag -r if you want to reinstall chroot or use termux-remove64 to remove it")
sys.exit()
elif (flag == ["-r"]) and (os.path.isdir(chroot_dir)):
elif (flag == "-r") and (os.path.isdir(chroot_dir)):
shutil.rmtree(chroot_dir)

# Select arch
Expand Down
2 changes: 1 addition & 1 deletion bin/termux-pacman-install32
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def check_integrity(file, sum):
if (not flag in ["-f", "-r"]) and (os.path.isdir(chroot_dir)):
print("ERROR: Chroot dir exists. Use flag -r if you want to reinstall chroot or use termux-pacman-remove32 to remove it")
sys.exit()
elif (flag == ["-r"]) and (os.path.isdir(chroot_dir)):
elif (flag == "-r") and (os.path.isdir(chroot_dir)):
shutil.rmtree(chroot_dir)

# Select arch
Expand Down
21 changes: 15 additions & 6 deletions bin/termux-pacman-install64
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,31 @@ glibc_script = f"""#!/data/data/com.termux/files/usr/bin/bash
echo "WARNING: EXPERIMENTAL"
pkg install wget
wget -O /tmp/glibc.tar.xz {glibc_link}
pacman -Syy 2>&1 > /dev/null
if pkg install wget --noconfirm --quiet --needed && wget -O /tmp/glibc.tar.xz https://github.com/Maxython/glibc-for-termux/releases/download/20220711/gpft-20220711-aarch64.tar.xz ; then
echo "Installing..."
else
echo "Something gone wrong"
exit
fi
PWD=$(pwd)
cd /tmp/
tar xJf glibc.tar.xz
pacman -U glibc-for-termux/*
if pacman -U --noconfirm glibc-for-termux/* ; then
echo "Installed!"
else
echo "Something gone wrong"
exit
fi
rm -rf glibc*
cd $PWD
echo "Use grun --shell for shell with custom commands, or use grun ./binary_file to.run glibc binaries"
echo "More info at: https://github.com/Maxython/glibc-for-termux"
echo "Autostarting grun --shell..."
grun --shell
"""

# Variables
Expand Down Expand Up @@ -174,7 +183,7 @@ def check_integrity(file, sum):
if (not flag in ["-f", "-r"]) and (os.path.isdir(chroot_dir)):
print("ERROR: Chroot dir exists. Use flag -r if you want to reinstall chroot or use termux-pacman-remove64 to remove it")
sys.exit()
elif (flag == ["-r"]) and (os.path.isdir(chroot_dir)):
elif (flag == "-r") and (os.path.isdir(chroot_dir)):
shutil.rmtree(chroot_dir)

# Select arch
Expand Down
2 changes: 1 addition & 1 deletion manifest-android-termux.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"control": {
"Package": "termux-install",
"Version": "1.1.0",
"Version": "1.1.1",
"Architecture": "all",
"Maintainer": "KrutosX <developer@krutosx.tk>",
"Depends": "python (>= 3.0), wget, proot, libandroid-support",
Expand Down

0 comments on commit 5d065b3

Please sign in to comment.