Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@ die () {
exit "$st"
}

############
### Check for network connection
###########
echo -e "\nChecking for internet connection...\n"
ping -c 3 github.com
rcode=$?
if [ $? -ne 0]; then
echo "------------------------------------"
echo "Unable to detect internet connection. Please check your connectivity and try again"
exit 1
fi
echo -e "Success!\n"

############
### Check whether installer is up-to-date
############
Expand Down
3 changes: 2 additions & 1 deletion update-tools-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
unset CDPATH
myPath="$( cd "$( dirname "${BASH_SOURCE[0]}")" && pwd )"
cd "$myPath"
username=$(logname)

active_branch=$(git symbolic-ref -q HEAD)
active_branch=${active_branch##refs/heads/}

git fetch
sudo -u $username git fetch
changes=$(git log HEAD..origin/"$active_branch" --oneline)

if [ -z "$changes" ]; then
Expand Down