Let my HOME alone 1/2
This commit is contained in:
parent
2ae37e902e
commit
a83e45df5e
94 changed files with 328 additions and 58 deletions
43
config/scripts/install-termux
Executable file
43
config/scripts/install-termux
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/data/data/com.termux/files/usr/bin/env bash
|
||||
|
||||
# Setups a Termux system the way I like it
|
||||
|
||||
if [ ! -d /data/data/com.termux/files ]; then
|
||||
echo "This is not a Termux system (or pacman isn't installed)"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Configuration
|
||||
function prompt { # text
|
||||
while true; do
|
||||
read -p "$1 [yn] " yn
|
||||
case $yn in
|
||||
[Yy]* ) return 1;;
|
||||
[Nn]* ) return 0;;
|
||||
* ) echo "Please answer yes or no.";;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
if [ -z $ROOT ]; then
|
||||
prompt "Is this device rooted and BusyBox installed in /system/xbin/?"
|
||||
ROOT=$?
|
||||
fi
|
||||
|
||||
# Update
|
||||
apt update
|
||||
apt upgrade
|
||||
|
||||
# (needed for install-prefs)
|
||||
apt install coreutils
|
||||
apt install grep
|
||||
# Used by some of my termux scripts
|
||||
apt install jq
|
||||
|
||||
# Config
|
||||
touch ~/.hushlogin
|
||||
|
||||
if [ $ROOT == 1 ]; then
|
||||
apt install tsu
|
||||
echo '/system/xbin/mount -o remount,rw /; ln -s /data/data/com.termux/files/usr /usr; /system/xbin/mount -o remount,ro /' | tsu
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue