#!/bin/sh if [ "$(type foreman 2>/dev/null)" == "" ]; then echo "You need Foreman installed to start the examples (gem install foreman)" exit 1 fi examplesdir=$(dirname $0) echo "Creating/updating the config database..." /usr/bin/env ruby -rubygems -I${examplesdir}/../lib $examplesdir/../bin/m2sh.rb \ -c ${examplesdir}/examples.sqlite load $examplesdir/config.rb if [ $? != 0 ]; then echo "Oops, problems installing the config DB. Aborting." exit 1 fi echo "Okay, now point a browser to http://localhost:8113/." cd $examplesdir foreman start