Merge, yay!
Merge branch 'master' of frogit:geoffrey/dotfiles
This commit is contained in:
commit
ec3b18f34c
|
@ -15,27 +15,27 @@ function prompt { # text
|
|||
}
|
||||
|
||||
# Don't ask for things that are already there
|
||||
local TERMUX=0
|
||||
TERMUX=0
|
||||
if [ -d /data/data/com.termux/files ]; then
|
||||
local TERMUX=1
|
||||
local GUI=0
|
||||
TERMUX=1
|
||||
GUI=0
|
||||
fi
|
||||
|
||||
if which i3 &> /dev/null; then
|
||||
local GUI=1
|
||||
GUI=1
|
||||
fi
|
||||
|
||||
if [ -z $ADMIN ]; then
|
||||
prompt "Are you a superuser on this machine?"
|
||||
local ADMIN=$?
|
||||
ADMIN=$?
|
||||
fi
|
||||
if [ -z $GUI ]; then
|
||||
prompt "Do you want a X environment on this machine?"
|
||||
local GUI=$?
|
||||
GUI=$?
|
||||
fi
|
||||
if [ -z $EXTRA ]; then
|
||||
prompt "Do you want not-so-needed software on this machine?"
|
||||
local EXTRA=$?
|
||||
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
|
||||
local installed=0
|
||||
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
|
||||
local YCM_ARGS=""
|
||||
YCM_ARGS=""
|
||||
if [ $TERMUX != 1 ]; then
|
||||
YCM_ARGS="$YCM_ARGS --clang-completer --tern-completer"
|
||||
fi
|
||||
|
|
41
scripts/install-termux
Executable file
41
scripts/install-termux
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/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