Skip to content

Instantly share code, notes, and snippets.

@carljm
Created May 18, 2011 19:29
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carljm/979340 to your computer and use it in GitHub Desktop.
Save carljm/979340 to your computer and use it in GitHub Desktop.
ghetto gem-installer that reads something similar to a pip requirements file
#!/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