blob: 5be6cec9e6ba609b579713a50d5db562e4170324 [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
Jian Li8bf6c442016-04-06 12:01:39 -07007# FIXME: temporarily fix 500 error in GUI, need to be improved with a better way
8if echo $* | egrep "\bclean\b"; then
9 . $ONOS_ROOT/tools/build/envDefaults
10 export KARAF_ROOT=${KARAF_ROOT:-~/Applications/apache-karaf-$KARAF_VERSION}
11 export STAGE=$(dirname $KARAF_ROOT)
12 echo "Removing data directories..."
13 [ -d $KARAF_ROOT ] && rm -fr $STAGE/data
14fi
15
Thomas Vachuskafcd61142015-04-23 13:59:08 -070016onos-setup-karaf && karaf "$@"