Created
April 30, 2012 13:06
-
-
Save vaclavbohac/2558150 to your computer and use it in GitHub Desktop.
Pull latest changes from nettefw repo with ease and beauty everytime you log in.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
REPO=$HOME/repo/nette | |
SUMMARY="Nette Framework" | |
MESSAGE="Internet connection not availaible." | |
sleep 5 # delay for wifi connection | |
if curl --silent --head http://www.google.com/ | egrep "20[0-9] Found|30[0-9] Found" > /dev/null | |
then | |
if git --git-dir=$REPO/.git pull origin master 2> /dev/null | grep "up-to-date" > /dev/null | |
then | |
MESSAGE="You are up to date! There are currently no new updates." | |
else | |
MESSAGE="Your local Nette Framework repository was updated." | |
fi | |
fi | |
notify-send -i $HOME/Pictures/nette.png "$SUMMARY" "$MESSAGE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment