#!/bin/sh

#   support command-line options
quiet="false"
while true; do
    case "$1" in
        -q | --quiet ) quiet="true"; shift ;;
        * ) break ;;
    esac
done
if [ $# -eq 0 ]; then
    echo "akka: ERROR: No boot classes specified" 1>&2
    echo "akka: USAGE: akka org.somewhere.BootClass" 1>&2
    exit 1
fi

#   set home directory
AKKA_HOME="@l_prefix@/var/akka"
export AKKA_HOME

#   execute Akka
@l_prefix@/bin/java \
    -Xms1024M -Xmx1024M -Xss1M -XX:MaxPermSize=256M -XX:+UseParallelGC \
    -cp "@l_prefix@/lib/akka/boot/scala-library.jar:@l_prefix@/etc/akka:@l_prefix@/lib/akka/akka/*" \
    -Dakka.home="$AKKA_HOME" \
    -Dakka.kernel.quiet="$quiet" \
    akka.kernel.Main \
    ${1+"$@"}

