Skip to content

Instantly share code, notes, and snippets.

View bdmac's full-sized avatar

Brian McManus bdmac

View GitHub Profile
@bdmac
bdmac / pre-commit
Last active August 29, 2015 14:12 — forked from dedico/pre-commit
#!/bin/bash
# source rvm and .rvmrc if present
[ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm"
[ -s "$PWD/.rvmrc" ] && . "$PWD/.rvmrc"
should_precompile=0
# check if anything changed in app/assets
if git diff-index --name-only HEAD | egrep '^app/assets' >/dev/null ; then