Compare commits
No commits in common. "6e868950a99e7687cf75e6b5d6a80cc825579fd1" and "5e0ffd926027dddf4c7d143b76727a87062c416d" have entirely different histories.
6e868950a9
...
5e0ffd9260
|
@ -15,27 +15,27 @@ function prompt { # text
|
|||
}
|
||||
|
||||
# Don't ask for things that are already there
|
||||
TERMUX=0
|
||||
local TERMUX=0
|
||||
if [ -d /data/data/com.termux/files ]; then
|
||||
TERMUX=1
|
||||
GUI=0
|
||||
local TERMUX=1
|
||||
local GUI=0
|
||||
fi
|
||||
|
||||
if which i3 &> /dev/null; then
|
||||
GUI=1
|
||||
local GUI=1
|
||||
fi
|
||||
|
||||
if [ -z $ADMIN ]; then
|
||||
prompt "Are you a superuser on this machine?"
|
||||
ADMIN=$?
|
||||
local ADMIN=$?
|
||||
fi
|
||||
if [ -z $GUI ]; then
|
||||
prompt "Do you want a X environment on this machine?"
|
||||
GUI=$?
|
||||
local GUI=$?
|
||||
fi
|
||||
if [ -z $EXTRA ]; then
|
||||
prompt "Do you want not-so-needed software on this machine?"
|
||||
EXTRA=$?
|
||||
local EXTRA=$?
|
||||
fi
|
||||
|
||||
# TODO Verify if the package exists before installing it
|
||||
|
@ -98,7 +98,7 @@ elif which dpkg &> /dev/null; then
|
|||
# Finding out if it's already installed or not
|
||||
STATUS=$(mktemp)
|
||||
LANG=C dpkg-query --status $1 &> $STATUS
|
||||
installed=0
|
||||
local installed=0
|
||||
if [ $? == 0 ]; then
|
||||
cat $STATUS | grep '^Status:' | grep ' installed' --quiet
|
||||
if [ $? == 0 ]; then
|
||||
|
@ -217,7 +217,7 @@ vim +PluginInstall +qall
|
|||
if [ $DEBIAN == 1 || $TERMUX == 1 ]; then
|
||||
inst python-dev python3-dev
|
||||
fi
|
||||
YCM_ARGS=""
|
||||
local YCM_ARGS=""
|
||||
if [ $TERMUX != 1 ]; then
|
||||
YCM_ARGS="$YCM_ARGS --clang-completer --tern-completer"
|
||||
fi
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
#!/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
|
||||
|
||||
# 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…
Reference in a new issue