Only delete the project if deleteme is in the name.
This commit is contained in:
6
setup.sh
6
setup.sh
@@ -11,10 +11,12 @@ echo "Working in '$DIR'."
|
|||||||
|
|
||||||
# Disable this since it can be timely.
|
# Disable this since it can be timely.
|
||||||
#echo -e "\n`date` - Upgrade Package Repos"
|
#echo -e "\n`date` - Upgrade Package Repos"
|
||||||
|
#
|
||||||
#pkg update &&
|
#pkg update &&
|
||||||
# pkg upgrade -y
|
# pkg upgrade -y
|
||||||
|
|
||||||
echo -e "\n`date` - Check Storage Permission"
|
echo -e "\n`date` - Check Storage Permission"
|
||||||
|
|
||||||
if [[ ! -e ~/storage/shared ]]; then
|
if [[ ! -e ~/storage/shared ]]; then
|
||||||
sleep 3
|
sleep 3
|
||||||
termux-setup-storage
|
termux-setup-storage
|
||||||
@@ -29,6 +31,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "\n`date` - Install Software"
|
echo -e "\n`date` - Install Software"
|
||||||
|
|
||||||
pkg install -y \
|
pkg install -y \
|
||||||
openssh tsu vim htop git cronie man zip \
|
openssh tsu vim htop git cronie man zip \
|
||||||
nmap traceroute wget \
|
nmap traceroute wget \
|
||||||
@@ -36,6 +39,7 @@ pkg install -y \
|
|||||||
kotlin php nodejs python libllvm hugo
|
kotlin php nodejs python libllvm hugo
|
||||||
|
|
||||||
echo -e "\n`date` - BASH Environment"
|
echo -e "\n`date` - BASH Environment"
|
||||||
|
|
||||||
if [[ ! -e ~/.env ]]; then
|
if [[ ! -e ~/.env ]]; then
|
||||||
if [[ -e env.example ]]; then
|
if [[ -e env.example ]]; then
|
||||||
mv -v env.example ~/.env
|
mv -v env.example ~/.env
|
||||||
@@ -70,7 +74,7 @@ fi
|
|||||||
|
|
||||||
echo -e "\n`date` - Cleanup"
|
echo -e "\n`date` - Cleanup"
|
||||||
|
|
||||||
if [[ -n $DIR && $DIR != "/" && -d .git ]]; then
|
if [[ -n $DIR && $DIR != "/" && $DIR == *"deleteme" && -d .git ]]; then
|
||||||
echo "We are in a git clone, remove the project."
|
echo "We are in a git clone, remove the project."
|
||||||
cd ..
|
cd ..
|
||||||
mv -v $DIR ~/TRASH/termux-"`date +'%Y%m%d%H%M%S'`" |
|
mv -v $DIR ~/TRASH/termux-"`date +'%Y%m%d%H%M%S'`" |
|
||||||
|
Reference in New Issue
Block a user