Skip to content

Instantly share code, notes, and snippets.

@kevinold
Created February 9, 2009 20:55
Show Gist options
  • Select an option

  • Save kevinold/60985 to your computer and use it in GitHub Desktop.

Select an option

Save kevinold/60985 to your computer and use it in GitHub Desktop.
#!/bin/bash
# NOTE: for pushd and popd to work either change the line above to #!/bin/bash
# or make sure that /bin/sh points to /bin/bash
#
# To enable this hook, rename this file to "post-update".
WORKDIR="/home/kevin/houses"
export GIT_DIR="$WORKDIR/.git"
pushd $WORKDIR > /dev/null
git pull
popd > /dev/null
sudo rm -rf /tmp/obj/* /tmp/cache/* /tmp/houses.cache
sudo /etc/init.d/houses_prod.sh stop
sudo /etc/init.d/houses_prod.sh start
exec git-update-server-info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment