Created
November 16, 2012 02:18
-
-
Save josefnpat/4083349 to your computer and use it in GitHub Desktop.
Watch for changes in a git repo and send to notify-send
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
#!/usr/bin/php | |
<?php | |
while(1){ | |
if("Already up-to-date." == $ans = rtrim(`git pull`)){ | |
echo "."; | |
} else { | |
echo "\n$ans\n"; | |
`notify-send "$ans"`; | |
} | |
sleep(5); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment