blob: cb44ac07eb360f9107ff3032cbfcb5118e2fcf99 [file] [log] [blame]
#!/bin/bash
# -----------------------------------------------------------------------------
# Makes sure local ONOS karaf instance is primed & staged and then launches
# karaf using the supplied arguments.
# -----------------------------------------------------------------------------
. $ONOS_ROOT/tools/build/envDefaults
if [ -L $ONOS_TAR ]; then
echo "WARN: This script does not support deploying buck artifacts"
fi
# FIXME: temporarily fix 500 error in GUI, need to be improved with a better way
if echo $* | egrep "\bclean\b"; then
export KARAF_ROOT=${KARAF_ROOT:-~/Applications/apache-karaf-$KARAF_VERSION}
export STAGE=$(dirname $KARAF_ROOT)
echo "Removing data directories..."
[ -d $KARAF_ROOT ] && rm -fr $STAGE/data
fi
onos-setup-karaf && karaf "$@"