files/mix.sh in server-blender-0.0.13 vs files/mix.sh in server-blender-0.0.14

- old
+ new

@@ -1,9 +1,9 @@ -#!/bin/bash -eu +set -ue SHADOW_PUPPET_VERSION="0.3.2" -MANIFEST_VERSION="0.0.14" +MANIFEST_VERSION="0.0.15" trap "echo FAILED" EXIT # ensure_gem GEM [VERSION] function ensure_gem() @@ -31,27 +31,33 @@ rvm use system set -eu fi } -use_system_ruby -ensure_gem shadow_puppet $SHADOW_PUPPET_VERSION -ensure_gem ruby-debug -ensure_gem server-blender-manifest $MANIFEST_VERSION +function run_recipe() { + echo "Mix: [recipe: $RECIPE, node: ${NODE:-}, roles: ${ROLES:-}]" -echo "Mix: [recipe: $RECIPE, node: ${NODE:-}, roles: ${ROLES:-}]" + # rvm substitutes cd with its scripts/cd which accesses unbound variables + set +u + cd /var/lib/blender/recipes + set -u -# rvm substitutes cd with its scripts/cd which accesses unbound variables -set +u -cd /var/lib/blender/recipes -set -u - -ruby -rrubygems <<-RUBY + /usr/bin/ruby -rrubygems <<-RUBY gem 'server-blender-manifest', '$MANIFEST_VERSION' require 'blender/manifest' Blender::Manifest.run("${SHADOW_PUPPET_VERSION}") || exit(1) RUBY +} -trap - EXIT +use_system_ruby +ensure_gem shadow_puppet $SHADOW_PUPPET_VERSION +ensure_gem ruby-debug +ensure_gem server-blender-manifest $MANIFEST_VERSION +if run_recipe; then + echo + echo "Your ServerShake is ready. Have fun!" +else + echo + echo "Failed to mix your ServerShake. Check error messages above for details" +fi -echo -echo Your ServerShake is ready. Have fun! +trap - EXIT