Created
September 17, 2012 11:47
-
-
Save shpshft/3736872 to your computer and use it in GitHub Desktop.
Switch .powrc to current rvm ruby & gemset for project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#--------------------------------------- | |
# 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