Skip to content

Instantly share code, notes, and snippets.

@rodreegez
Created May 28, 2013 18:21
Show Gist options
  • Save rodreegez/5664910 to your computer and use it in GitHub Desktop.
Save rodreegez/5664910 to your computer and use it in GitHub Desktop.
Create a Gemfile with the specified gems.
#!/bin/bash
# Usage:
#
# $ gemfile sinatra
# $ cat Gemfile
# source 'https://rubygems.org'
# gem 'sinatra'
function gemfile {
echo "source 'https://rubygems.org'" > './Gemfile'
for var in "$@"
do
echo "gem '"$var"'" >> './Gemfile'
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment