Skip to content

Instantly share code, notes, and snippets.

@mikesusz
Created February 1, 2011 16:52
Show Gist options
  • Save mikesusz/806129 to your computer and use it in GitHub Desktop.
Save mikesusz/806129 to your computer and use it in GitHub Desktop.
a git pre-commit hook for compass compiling of sass to css
#!/bin/sh
#
# this pre-commit script uses compass to compile and compress stylesheet partials
compass compile wp-content/themes/mytheme/ -s compact --force --no-line-comments
wait $!
git add wp-content/themes/mytheme/style.css
@mikesusz
Copy link
Author

mikesusz commented Feb 1, 2011

many thanks to fr0sty on freenode/#git for pointing out that i was (originally) calling compass via 'exec' which never returned status to the shell and therefore (subsequent commands) weren't waiting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment