lib/templates/create/install.sh in sunzi-1.0.0 vs lib/templates/create/install.sh in sunzi-1.1.0
- old
+ new
@@ -1,6 +1,7 @@
#!/bin/bash
+set -e
# Load base utility functions like sunzi.mute() and sunzi.install()
source recipes/sunzi.sh
# This line is necessary for automated provisioning for Debian/Ubuntu.
@@ -9,15 +10,15 @@
# Add Dotdeb repository. Recommended if you're using Debian. See http://www.dotdeb.org/about/
# source recipes/dotdeb.sh
# Update installed packages
-sunzi.mute "aptitude update"
-sunzi.mute "aptitude -y safe-upgrade"
+sunzi.mute "apt-get update"
+sunzi.mute "apt-get -y upgrade"
# Install packages
-sunzi.install "git-core ntp curl"
+sunzi.mute "apt-get -y install git-core ntp curl"
# Set RAILS_ENV
environment=$(cat attributes/environment)
if ! grep -Fq "RAILS_ENV" ~/.bash_profile; then
@@ -30,16 +31,15 @@
source recipes/rvm.sh
ruby_version=$(cat attributes/ruby_version)
if [[ "$(which ruby)" != /usr/local/rvm/rubies/ruby-$ruby_version* ]]; then
echo "Installing ruby-$ruby_version"
- sunzi.install build-essential libssl-dev libreadline6-dev
- rvm install $ruby_version
+ # Install dependencies using RVM autolibs - see https://blog.engineyard.com/2013/rvm-ruby-2-0
+ rvm install --autolibs=3 $ruby_version
rvm $ruby_version --default
echo 'gem: --no-ri --no-rdoc' > ~/.gemrc
# Install Bundler
- gem update --system
gem install bundler
fi
# Install sysstat, then configure if this is a new install.
if sunzi.install "sysstat"; then