Skip to content

Instantly share code, notes, and snippets.

@xaviershay
Created June 30, 2014 15:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save xaviershay/a28adae38f7903f4e34e to your computer and use it in GitHub Desktop.
Save xaviershay/a28adae38f7903f4e34e to your computer and use it in GitHub Desktop.
#!/bin/bash
set -ex
bundle install --standalone
digest=$(md5 -q Gemfile)
cmd="raise \"Gemfile changed\" if %x[md5 -q Gemfile].chomp != \"${digest}\""
echo $cmd > bundle/bundler/setup.rb.new
cat bundle/bundler/setup.rb >> bundle/bundler/setup.rb.new
mv bundle/bundler/setup{.rb.new,.rb}
@indirect
Copy link

indirect commented Jul 1, 2014

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment