Last active
April 30, 2020 22:30
-
-
Save p4p1/38be0de4c1cad30bd7b96f06e0065022 to your computer and use it in GitHub Desktop.
🍤🍤🍤🍤
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# phone.sh | |
# Created on: ven. 24 avril 2020 06:21:51 CEST | |
# | |
# ____ __ ____ __ | |
# ( _ \ /. |( _ \/ ) | |
# )___/(_ _))___/ )( | |
# (__) __ (_)(__) _(__) ____ __ ____ | |
# ( \/ )( _ )( _ \(_ _)( ) ( ___) | |
# ) ( )(_)( ) _ < _)(_ )(__ )__) | |
# (_/\/\_)(_____)(____/(____)(____)(____) | |
# | |
# Description: | |
# My installation script for termux on android devices | |
# Usage: | |
# chmod +x phone.sh && ./phone.sh | |
packages=(vifm vim git openssh python nmap make clang gdb tmux termux-api unstable-repo x11-repo tigervnc) | |
config="https://p4p1.github.io/phone_backup.tar.xz" | |
for item in ${packages[*]}; do | |
echo -n "Checking $item -> " | |
if hash $item &> /dev/null;then | |
echo -e "\e[1;34m:)\e[m" | |
else | |
echo -e "\e[1;31m:(\e[m" | |
pkg install -y $item | |
fi | |
done | |
curl $config --output backup.tar.xz | |
tar xf ./backup.tar.xz | |
for item in $(ls -a ./phone_backup/ | sed 1,2d); do | |
echo -e "\e[1;34mAdding\e[m $item in $HOME/ directory" | |
[ -f $HOME/$item ] && rm -rf $HOME/$item | |
[ -d $HOME/$item ] && rm -rf $HOME/$item | |
cp -r ./phone_backup/$item $HOME/$item | |
done | |
rm -rf phone_backup | |
rm -rf backup.tar.xz | |
echo -n "Checking for shh key -> " | |
if [ -f $HOME/.ssh/id_rsa.pub -a -f $HOME/.ssh/id_rsa ]; then | |
echo -e "\e[1;34m:)\e[m" | |
else | |
echo -e "\e[1;31m:(\e[m" | |
ssh-keygen | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment