my-boxen/script/bootstrap

22 lines
587 B
Text
Raw Normal View History

2012-10-02 14:43:59 -04:00
#!/bin/sh
# Make sure all our local dependencies are available.
2012-10-03 14:12:49 -04:00
set -e
2012-10-02 14:43:59 -04:00
# FIX: only sudo if gem home isn't writable
2013-07-06 11:28:07 -04:00
(/usr/bin/gem spec bundler -v '~> 1.3.0' > /dev/null 2>&1) || {
/usr/bin/sudo -p "Need to install Bundler for system ruby, password for sudo: " \
2013-07-06 11:28:07 -04:00
/usr/bin/gem install bundler -v '~> 1.3.0' --no-rdoc --no-ri
}
2012-10-02 14:43:59 -04:00
# We don't want old config hanging around.
rm -rf .bundle/config
rm -rf .librarian/puppet/config
2012-10-02 14:43:59 -04:00
# Bundle install unless we're already up to date.
export PATH=$(pwd)/vendor/shims:$PATH
/usr/bin/bundle install --binstubs bin --path .bundle --quiet "$@"