blob: cb44ac07eb360f9107ff3032cbfcb5118e2fcf99 [file] [log] [blame]
Thomas Vachuskafcd61142015-04-23 13:59:08 -07001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Makes sure local ONOS karaf instance is primed & staged and then launches
4# karaf using the supplied arguments.
5# -----------------------------------------------------------------------------
6
Yuta HIGUCHIb4bf7c82016-07-01 20:49:19 -07007. $ONOS_ROOT/tools/build/envDefaults
8if [ -L $ONOS_TAR ]; then
9 echo "WARN: This script does not support deploying buck artifacts"
10fi
11
Jian Li8bf6c442016-04-06 12:01:39 -070012# FIXME: temporarily fix 500 error in GUI, need to be improved with a better way
13if echo $* | egrep "\bclean\b"; then
Jian Li8bf6c442016-04-06 12:01:39 -070014 export KARAF_ROOT=${KARAF_ROOT:-~/Applications/apache-karaf-$KARAF_VERSION}
15 export STAGE=$(dirname $KARAF_ROOT)
16 echo "Removing data directories..."
17 [ -d $KARAF_ROOT ] && rm -fr $STAGE/data
18fi
19
Yuta HIGUCHIb4bf7c82016-07-01 20:49:19 -070020onos-setup-karaf && karaf "$@"