Sha256: c8a231f9cae30c611314caf3d433dff010814fe112ede781a6e10897fc6b2181

Contents?: true

Size: 922 Bytes

Versions: 1

Compression:

Stored size: 922 Bytes

Contents

#!/bin/bash -eu

SHADOW_PUPPET_VERSION="0.3.2"
MANIFEST_VERSION="0.0.12"

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 $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
}

ensure_gem shadow_puppet $SHADOW_PUPPET_VERSION
ensure_gem ruby-debug
ensure_gem server-blender-manifest $MANIFEST_VERSION

echo "Mix: [recipe: $RECIPE, node: ${NODE:-}, roles: ${ROLES:-}]"

cd /var/lib/blender/recipes

ruby -rrubygems <<-RUBY
gem 'server-blender-manifest', '$MANIFEST_VERSION'
require 'blender/manifest'
Blender::Manifest.run("${SHADOW_PUPPET_VERSION}") || exit(1)
RUBY

trap - EXIT

echo
echo Your ServerShake is ready. Have fun!

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
server-blender-0.0.12 files/mix.sh