Skip to content

Commit

Permalink
Insert a check for curl (#2013)
Browse files Browse the repository at this point in the history
* Insert a check for curl

* typo

* confirmation messages
  • Loading branch information
taniman authored and SgtBatten committed Aug 8, 2018
1 parent 5369c8f commit 9d45878
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9d45878

Please sign in to comment.