Skip to content

Instantly share code, notes, and snippets.

Created June 6, 2012 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/2882887 to your computer and use it in GitHub Desktop.
Save anonymous/2882887 to your computer and use it in GitHub Desktop.
#!/bin/sh
if test "$(git diff --name-only HEAD@{1} | ack '500|404|home.html|static-content')"
then
echo "running ./manage.py generatemedia to update files"
python myproject/manage.py generatemedia --nodebug
git add -A myproject/_generated_media/*
git add -A static-content/*
git commit -m "updating media (automatic update by git merge hook)"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment