Skip to content

Instantly share code, notes, and snippets.

@bradfordcp
Created September 6, 2012 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradfordcp/3659625 to your computer and use it in GitHub Desktop.
Save bradfordcp/3659625 to your computer and use it in GitHub Desktop.
lolcommits post-commit hook using rvm
#!/bin/bash
# Load RVM into a shell session *as a function*
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
# First try to load from a user install
source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
# Then try to load from a root install
source "/usr/local/rvm/scripts/rvm"
else
printf "ERROR: An RVM installation was not found.\n"
fi
source ".rvmrc"
lolcommits --capture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment