Skip to content

Commit

Permalink
On branch master
Browse files Browse the repository at this point in the history
  • Loading branch information
SDRausty committed Nov 24, 2017
1 parent 72a39df commit 70bc415
Show file tree
Hide file tree
Showing 10 changed files with 133 additions and 63 deletions.
3 changes: 3 additions & 0 deletions CHANGE.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fri Nov 24 11:49:41 EST 2017
43M .
41M .git
1 change: 1 addition & 0 deletions TermuxArch
Submodule TermuxArch added at 72a39d
2 changes: 1 addition & 1 deletion docs
106 changes: 53 additions & 53 deletions scripts/files/archsystemconfigs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ addprofile ()
if [ ! -e $HOME/.profile ] ; then
:
else
grep proxy $HOME/.profile |grep "export" >> root/.profile 2>/dev/null||:
grep "proxy" $HOME/.profile |grep "export" >> root/.profile 2>/dev/null||:
fi
}

Expand Down Expand Up @@ -131,15 +131,6 @@ addgp ()
chmod 700 root/bin/gp
}

addresolvconf ()
{
rm etc/resolv* 2>/dev/null||:
cat > etc/resolv.conf <<- EOM
nameserver 8.8.8.8
nameserver 8.8.4.4
EOM
}

addmotd ()
{
cat > etc/motd <<- EOM
Expand All @@ -157,6 +148,58 @@ addmotd ()
chmod 700 root/bin/gp
}

addresolvconf ()
{
rm etc/resolv* 2>/dev/null||:
cat > etc/resolv.conf <<- EOM
nameserver 8.8.8.8
nameserver 8.8.4.4
EOM
}

addt ()
{
cat > root/bin/t <<- EOM
#!/bin/bash -e
if [ ! -e /usr/bin/tree ] ; then
pacman -Syu tree --noconfirm
tree \$@
else
tree \$@
fi
EOM
chmod 700 root/bin/t
}

addv ()
{
cat > root/bin/v <<- EOM
#!/bin/bash -e
if [ ! -e /usr/bin/vim ] ; then
pacman -Syu vim --noconfirm
vim \$@
else
vim \$@
fi
EOM
chmod 700 root/bin/v
}

addyt ()
{
cat > root/bin/yt <<- EOM
#!/bin/bash -e
if [ ! -e /usr/bin/youtube-dl ] ; then
pacman -Syu python-pip --noconfirm
pip install youtube-dl
youtube-dl \$@
else
youtube-dl \$@
fi
EOM
chmod 700 root/bin/yt
}

makefinishsetup ()
{
binfs=finishsetup.sh
Expand Down Expand Up @@ -218,46 +261,3 @@ makesetupbin ()
chmod 700 root/bin/setupbin.sh
}

addt ()
{
cat > root/bin/t <<- EOM
#!/bin/bash -e
if [ ! -e /usr/bin/tree ] ; then
pacman -Syu tree --noconfirm
tree \$@
else
tree \$@
fi
EOM
chmod 700 root/bin/t
}

addyt ()
{
cat > root/bin/yt <<- EOM
#!/bin/bash -e
if [ ! -e /usr/bin/youtube-dl ] ; then
pacman -Syu python-pip --noconfirm
pip install youtube-dl
youtube-dl \$@
else
youtube-dl \$@
fi
EOM
chmod 700 root/bin/yt
}

addv ()
{
cat > root/bin/v <<- EOM
#!/bin/bash -e
if [ ! -e /usr/bin/vim ] ; then
pacman -Syu vim --noconfirm
vim \$@
else
vim \$@
fi
EOM
chmod 700 root/bin/v
}

1 change: 0 additions & 1 deletion scripts/files/necessaryfunctions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ getimage ()

makebin ()
{
bin=startarch
makestartbin
printconfigq
touchupsys
Expand Down
5 changes: 0 additions & 5 deletions scripts/files/printoutstatements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,3 @@ printfooter ()
printf "\033[1;32m 🕛 = 🕛 \033[1;34mTermux-wake-lock released. Your Arch Linux in Termux is installed and updated. Use \033[32;1m\`tzselect\`\033[1;34m to assit in setting your time zone. \n\n\033[0m"
}

printtail ()
{
printf "\n\033[0mThank you for using \033[1;32m\`setupTermuxArch.sh\`\033[0m to install Arch Linux in Termux 🏁 \n\n\033[0m"'\033]2; Thank you for using `setupTermuxArch.sh` to install Arch Linux in Termux 📲 \007'
}

38 changes: 37 additions & 1 deletion scripts/files/setupTermuxArch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# If you are encountering issues with the system-image.tar.gz file regarding download time, repository website connection and/or md5 checksum error, edit this script and change $mirror to your desired geographic location in knownconfigurations.sh. Before editing this file, ensure termux-wake-lock is running during script operation and that you have a stable Internet connection.
################################################################################

bin=startarch

depends ()
{
printf '\033]2; Thank you for using `setupTermuxArch.sh` 📲 \007'"\n 🕛 \033[36;1m< 🕛 \033[1;34mThis setup script will attempt to set Arch Linux up in your Termux environment. When successfully completed, you will be enjoying the bash prompt in Arch Linux in Termux on your smartphone or tablet. If you do not see 🕐 one o'clock below, check your Internet connection and run this script again. "
Expand Down Expand Up @@ -46,6 +48,12 @@ printmd5syschkerror ()
exit
}

printtail ()
{
printf "\n\033[0mThank you for using \033[1;32m\`setupTermuxArch.sh\`\033[0m to install Arch Linux in Termux 🏁 \n\n\033[0m"'\033]2; Thank you for using `setupTermuxArch.sh` to install Arch Linux in Termux 📲 \007'
exit
}

rmdsc ()
{
rm archsystemconfigs.sh
Expand All @@ -61,6 +69,35 @@ rmds ()
rm setupTermuxArch.tar.gz
}

# Begin
if [[ $1 = [Dd]* ]];then
printf "debug wanted\n"
printtail
elif [[ $1 = [Hh]* ]];then
printf "help wanted\n"
printtail
elif [[ $1 = [Uu]* ]];then
printf "Uninstalling Arch Linux \n"
if [ -e $PREFIX/bin/$bin ] ;then
rm $PREFIX/bin/$bin
else
printf "setupTermuxArch.sh Uninstalling Arch Linux nothing to do for $bin\n"
fi
if [ -d $HOME/arch ] ;then
cd $HOME/arch
rm -rf * 2>/dev/null||:
find -type d -exec chmod 700 {} \; 2>/dev/null||:
cd ..
rm -rf $HOME/arch
printf "setupTermuxArch.sh uninstalling Arch Linux done\n"
else
printf "setupTermuxArch.sh Uninstalling Arch Linux nothing to do for $HOME/arch\n"
fi
printtail
else
:
fi

# Main Block
depends
callsystem
Expand All @@ -70,5 +107,4 @@ rm $HOME/arch/root/bin/setupbin.sh
printfooter
$HOME/arch/$bin ||:
printtail
exit

2 changes: 1 addition & 1 deletion setupTermuxArch.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7c18177e8ecda254e4f1d1bf6780c22f setupTermuxArch.tar.gz
3220a1488e7b7a7ab45b3140d8e8de54 setupTermuxArch.tar.gz
38 changes: 37 additions & 1 deletion setupTermuxArch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# If you are encountering issues with the system-image.tar.gz file regarding download time, repository website connection and/or md5 checksum error, edit this script and change $mirror to your desired geographic location in knownconfigurations.sh. Before editing this file, ensure termux-wake-lock is running during script operation and that you have a stable Internet connection.
################################################################################

bin=startarch

depends ()
{
printf '\033]2; Thank you for using `setupTermuxArch.sh` 📲 \007'"\n 🕛 \033[36;1m< 🕛 \033[1;34mThis setup script will attempt to set Arch Linux up in your Termux environment. When successfully completed, you will be enjoying the bash prompt in Arch Linux in Termux on your smartphone or tablet. If you do not see 🕐 one o'clock below, check your Internet connection and run this script again. "
Expand Down Expand Up @@ -46,6 +48,12 @@ printmd5syschkerror ()
exit
}

printtail ()
{
printf "\n\033[0mThank you for using \033[1;32m\`setupTermuxArch.sh\`\033[0m to install Arch Linux in Termux 🏁 \n\n\033[0m"'\033]2; Thank you for using `setupTermuxArch.sh` to install Arch Linux in Termux 📲 \007'
exit
}

rmdsc ()
{
rm archsystemconfigs.sh
Expand All @@ -61,6 +69,35 @@ rmds ()
rm setupTermuxArch.tar.gz
}

# Begin
if [[ $1 = [Dd]* ]];then
printf "debug wanted\n"
printtail
elif [[ $1 = [Hh]* ]];then
printf "help wanted\n"
printtail
elif [[ $1 = [Uu]* ]];then
printf "Uninstalling Arch Linux \n"
if [ -e $PREFIX/bin/$bin ] ;then
rm $PREFIX/bin/$bin
else
printf "setupTermuxArch.sh Uninstalling Arch Linux nothing to do for $bin\n"
fi
if [ -d $HOME/arch ] ;then
cd $HOME/arch
rm -rf * 2>/dev/null||:
find -type d -exec chmod 700 {} \; 2>/dev/null||:
cd ..
rm -rf $HOME/arch
printf "setupTermuxArch.sh uninstalling Arch Linux done\n"
else
printf "setupTermuxArch.sh Uninstalling Arch Linux nothing to do for $HOME/arch\n"
fi
printtail
else
:
fi

# Main Block
depends
callsystem
Expand All @@ -70,5 +107,4 @@ rm $HOME/arch/root/bin/setupbin.sh
printfooter
$HOME/arch/$bin ||:
printtail
exit

Binary file modified setupTermuxArch.tar.gz
Binary file not shown.

0 comments on commit 70bc415

Please sign in to comment.