Created
May 18, 2011 19:29
-
-
Save carljm/979340 to your computer and use it in GitHub Desktop.
ghetto gem-installer that reads something similar to a pip requirements file
This file contains 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
#!/bin/bash | |
vfile=$1 | |
for line in `cat ${vfile}`; do | |
gem=${line%%=*} | |
version=${line##*=} | |
if gem list | grep ${gem} | grep "(${version})"; then | |
echo "${gem} (${version}) is already installed" | |
else | |
gem install ${gem} -v ${version} --no-rdoc --no-ri | |
fi | |
done | |
gem cleanup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment