Created
November 16, 2008 21:43
-
-
Save robbyrussell/25564 to your computer and use it in GitHub Desktop.
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 | |
# | |
# bash script to run a git-pull... and restart mongrel for you... | |
# | |
function mongrel_reload { | |
mongrel_rails stop; | |
mongrel_rails start -d; | |
} | |
echo "Starting Git-Mongrel-Reload...\n*** Ctrl-C to quit" | |
mongrel_reload | |
while [ true ]; do | |
git_response=$( git pull ); | |
if [ "$git_response" != "Already up-to-date." ] | |
then | |
echo "Code was updated..."; | |
echo $git_response; | |
mongrel_reload | |
fi | |
sleep 180; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment