blob: 8ffe1abf52a034e7f56dffe32fda6eab22307cd6 [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
Thomas Vachuska5905f2c2016-10-21 09:46:35 -07007echo "This command is deprecated and will be removed imminently!!!"
8echo "Please use 'buck run onos-local' instead."
9echo "e.g.: buck run onos-local -- clean debug"
10echo " or: buck run onos-local -- debug"
11
12
Yuta HIGUCHIb4bf7c82016-07-01 20:49:19 -070013. $ONOS_ROOT/tools/build/envDefaults
14if [ -L $ONOS_TAR ]; then
15 echo "WARN: This script does not support deploying buck artifacts"
16fi
17
Yuta HIGUCHI7d8b3b12016-09-12 13:09:47 -070018SETUP_OPTS=""
Jian Li8bf6c442016-04-06 12:01:39 -070019# FIXME: temporarily fix 500 error in GUI, need to be improved with a better way
20if echo $* | egrep "\bclean\b"; then
Jian Li8bf6c442016-04-06 12:01:39 -070021 export KARAF_ROOT=${KARAF_ROOT:-~/Applications/apache-karaf-$KARAF_VERSION}
22 export STAGE=$(dirname $KARAF_ROOT)
23 echo "Removing data directories..."
24 [ -d $KARAF_ROOT ] && rm -fr $STAGE/data
Yuta HIGUCHI7d8b3b12016-09-12 13:09:47 -070025 SETUP_OPTS="${SETUP_OPTS} clean"
Jian Li8bf6c442016-04-06 12:01:39 -070026fi
27
Yuta HIGUCHI7d8b3b12016-09-12 13:09:47 -070028onos-setup-karaf $SETUP_OPTS && karaf "$@"