Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 25 lines (23 sloc) 810 Bytes
#!/usr/bin/env bash
#
# Find MAGLEV_HOME
if [ -z "$MAGLEV_HOME" ]; then
if [ -x $PWD/gemstone/bin/startstone ]; then
# echo "using $PWD as MAGLEV_HOME"
export MAGLEV_HOME=$PWD
else
echo "$COMMAND: [Warning] \$MAGLEV_HOME is not set."
tree=$(cd `dirname "$0"/` ; cd .. ; pwd)
if [ -d "${tree}/gemstone" ]; then
export MAGLEV_HOME="${tree}"
echo "Assuming ${MAGLEV_HOME}"
else
echo "$COMMAND: [Error] Neither $PWD nor $tree are a valid MAGLEV_HOME directory"
echo "To fix this, set a valid MAGLEV_HOME in your .bashrc"
exit 1
fi
fi
fi
# By execing maglev-ruby, irb now accepts VM arguments such as --stonehost,
# --tocsz etc, and parsing of ENV variables such as $MAGLEV_OPTS.
exec $MAGLEV_HOME/bin/maglev-ruby "$@" $MAGLEV_HOME/bin/maglev_irb.rb