Skip to content

Instantly share code, notes, and snippets.

@compleatang
Created February 14, 2013 17:02
Show Gist options
  • Save compleatang/4954274 to your computer and use it in GitHub Desktop.
Save compleatang/4954274 to your computer and use it in GitHub Desktop.
Automatically import all the gems. Assumes that gem lists have been exported (I use a cron job to keep this up to date) into ~/Dropbox/Rvm-Gems.
#!/bin/zsh
rvm use default@global
cd ~/Dropbox/Rvm-Gems
gemfiles=("${(@f)$(ls /home/coda/Dropbox/Rvm-Gems)}")
IFS='.'
for f in $gemfiles[@]; do
gems=($(echo $f))
rvm gemset use $gems[1] --create
rvm gemset import $gems[1]
done
cd ~
# Collateral Cron Task
# cd /home/coda/Dropbox/Rvm-Gems && rvm all-gemsets do rvm gemset export
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment