Created
August 25, 2015 23:24
-
-
Save semenko/dad434a506486117f570 to your computer and use it in GitHub Desktop.
git status tester
This file contains 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/sh | |
# Author: Nick Semenkovich <[email protected]> | |
git remote update >/dev/null 2>&1 | |
gitstatus=`git log master..origin/master` | |
if [ "$gitstatus" ] | |
then | |
if tty -s | |
then | |
USER_TTY=`tty` | |
echo "\n\a\t\t@@@ WARNING @@@ - This software is outdated." > $USER_TTY | |
echo "\n\nThere is an updated version in git with these changes:\n" > $USER_TTY | |
echo "$gitstatus" > $USER_TTY | |
echo "\n\n\t\t@@@ Please run: git pull @@@\n" > $USER_TTY | |
sleep 2 | |
fi | |
fi | |
#END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment