Skip to content

Instantly share code, notes, and snippets.

@shpshft
Created September 17, 2012 11:47
Show Gist options
  • Save shpshft/3736872 to your computer and use it in GitHub Desktop.
Save shpshft/3736872 to your computer and use it in GitHub Desktop.
Switch .powrc to current rvm ruby & gemset for project
#---------------------------------------
# I used this to create a RVM-hook for
# switching the .powenv after each rvm
# use change.
#
# ~/.rvm/hooks/after_use_update_powrc
#---------------------------------------
for file in `ls ~/.pow/` ; do
POW_LINK_TARGET=`readlink ~/.pow/$file`
if [ `pwd` = $POW_LINK_TARGET ]; then
rvm env -- ``rvm current`` > .powenv
fi
done
# Making it executable, run in terminal:
# chmod +x ~/.rvm/hooks/after_use_update_powrc
# Also: derp.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment