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.
|
||||
#echo -e "\n`date` - Upgrade Package Repos"
|
||||
#
|
||||
#pkg update &&
|
||||
# pkg upgrade -y
|
||||
|
||||
echo -e "\n`date` - Check Storage Permission"
|
||||
|
||||
if [[ ! -e ~/storage/shared ]]; then
|
||||
sleep 3
|
||||
termux-setup-storage
|
||||
@@ -29,6 +31,7 @@ else
|
||||
fi
|
||||
|
||||
echo -e "\n`date` - Install Software"
|
||||
|
||||
pkg install -y \
|
||||
openssh tsu vim htop git cronie man zip \
|
||||
nmap traceroute wget \
|
||||
@@ -36,6 +39,7 @@ pkg install -y \
|
||||
kotlin php nodejs python libllvm hugo
|
||||
|
||||
echo -e "\n`date` - BASH Environment"
|
||||
|
||||
if [[ ! -e ~/.env ]]; then
|
||||
if [[ -e env.example ]]; then
|
||||
mv -v env.example ~/.env
|
||||
@@ -70,7 +74,7 @@ fi
|
||||
|
||||
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."
|
||||
cd ..
|
||||
mv -v $DIR ~/TRASH/termux-"`date +'%Y%m%d%H%M%S'`" |
|
||||
|
Reference in New Issue
Block a user