Skip to content

Instantly share code, notes, and snippets.

@aaronpk
Created October 29, 2012 17:02
Show Gist options
  • Select an option

  • Save aaronpk/3974909 to your computer and use it in GitHub Desktop.

Select an option

Save aaronpk/3974909 to your computer and use it in GitHub Desktop.
Automatically update a git repo from "staging" branch and restart website if needed
#!/bin/bash
output=`git pull origin staging`
echo $output
if [ "$output" != "Already up-to-date." ]; then
git submodule update
touch tmp/restart.txt
echo Restarting Website
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment