#!/bin/bash
#
# drmapp [--gui] <jar[!class]> [pars...]
#
# starts a drm experiment from the jar file <jar>.
# [pars...] are passed on to the DRM node, as specified in the
# configuration documentation.
# The started experiment will have application rights on the node
# in which it is started.
# If --gui is specified, TestGUINode will be launched, otherwise
# a console application.
#

export APPSTARTERCLASS=drm.server.NakedNode
if [ "$1" = "--gui" ]; then
	export APPSTARTERCLASS=drm.server.TestGUINode
	shift
fi

if [ -z $1 ]; then
	echo "Specify app to run: drmapp [--gui] <jar[!class]> [pars...]"
	exit 1
fi

DRMAPP="$1"
shift
drmstarter --rootdir `dirname $DRMAPP` $APPSTARTERCLASS "$@" \
"runClass.xxx=$DRMAPP"

