Sha256: ab48c14d485e40668b41ba1e5f35dfb34ec0f6202c680e89806c7e4c19308ef0
Contents?: true
Size: 1.29 KB
Versions: 1
Compression:
Stored size: 1.29 KB
Contents
set -ue SHADOW_PUPPET_VERSION="0.3.2" MANIFEST_VERSION="0.1.2" trap "echo FAILED" EXIT # ensure_gem GEM [VERSION] function ensure_gem() { if [ $# -eq 2 ]; then # name + version if ! gem list $1 | grep -q "$1 (\([^,]*, \)*${2//./\\.}\(, [^,]*\)*)$"; then echo installing $1 -v$2 gem install --no-ri --no-rdoc $1 -v$2 fi else # name only if ! gem list $1 | grep -q "^$1 ";then echo installing $1 gem install --no-ri --no-rdoc $1 fi fi } function use_system_ruby() { if [ -e /usr/local/rvm ]; then echo RVM: Switch to system ruby set +eu . /usr/local/rvm/scripts/rvm rvm use system set -eu fi } function run_recipe() { 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 /usr/bin/ruby -rrubygems <<-RUBY gem 'server-blender-manifest', '$MANIFEST_VERSION' require 'blender/manifest' Blender::Manifest.run("${SHADOW_PUPPET_VERSION}") || exit(1) RUBY } 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 mix is ready. Have fun!" else echo echo "Mix failed. Check error messages above for details" fi trap - EXIT
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
server-blender-0.0.20 | files/mix.sh |