Skip to content

Instantly share code, notes, and snippets.

@robbyrussell
Created November 16, 2008 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robbyrussell/25564 to your computer and use it in GitHub Desktop.
Save robbyrussell/25564 to your computer and use it in GitHub Desktop.
#!/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