diff --git a/update.sh b/update.sh index d3c5e04..a10c206 100644 --- a/update.sh +++ b/update.sh @@ -1,7 +1,7 @@ #!/bin/bash ### Linux .jar Update Script for ProfitTrailer -### LAST UPDATED 23 JULY 2018 +### LAST UPDATED 09 August 2018 ### Place this script in the root folder where all your individual bot folders are and then execute it. ### For simplicity each ProfitTrailer.jar file should be nested exactly one subfolder. @@ -32,6 +32,40 @@ if ! [ -x "$(command -v unzip)" ]; then ### install unzip if the user wants to proceed ### if [[ "$install" == "y" ]] || [[ "$install" == "Y" ]]; then sudo apt install unzip + + if ! [ -x "$(command -v unzip)" ]; then + echo "$(tput setaf 1)Something went wrong.... $(tput sgr0)" + echo + exit + else + echo $(tput setaf 2) + echo "Unzip Installed" + echo $(tput sgr0) + fi + else + echo "$(tput setaf 1)Process Aborted.... $(tput sgr0)" + echo + exit + fi +fi + +### Check if curl is installed ### +if ! [ -x "$(command -v curl)" ]; then + read -p "Curl is not installed, Do you wish to install it (Y/N)? : " install + + ### install curl if the user wants to proceed ### + if [[ "$install" == "y" ]] || [[ "$install" == "Y" ]]; then + sudo apt install curl + + if ! [ -x "$(command -v curl)" ]; then + echo "$(tput setaf 1)Something went wrong.... $(tput sgr0)" + echo + exit + else + echo $(tput setaf 2) + echo "Curl Installed" + echo $(tput sgr0) + fi else echo "$(tput setaf 1)Process Aborted.... $(tput sgr0)" echo