Thomas Vachuska | fcd6114 | 2015-04-23 13:59:08 -0700 | [diff] [blame] | 1 | #!/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 Vachuska | 5905f2c | 2016-10-21 09:46:35 -0700 | [diff] [blame^] | 7 | echo "This command is deprecated and will be removed imminently!!!" |
| 8 | echo "Please use 'buck run onos-local' instead." |
| 9 | echo "e.g.: buck run onos-local -- clean debug" |
| 10 | echo " or: buck run onos-local -- debug" |
| 11 | |
| 12 | |
Yuta HIGUCHI | b4bf7c8 | 2016-07-01 20:49:19 -0700 | [diff] [blame] | 13 | . $ONOS_ROOT/tools/build/envDefaults |
| 14 | if [ -L $ONOS_TAR ]; then |
| 15 | echo "WARN: This script does not support deploying buck artifacts" |
| 16 | fi |
| 17 | |
Yuta HIGUCHI | 7d8b3b1 | 2016-09-12 13:09:47 -0700 | [diff] [blame] | 18 | SETUP_OPTS="" |
Jian Li | 8bf6c44 | 2016-04-06 12:01:39 -0700 | [diff] [blame] | 19 | # FIXME: temporarily fix 500 error in GUI, need to be improved with a better way |
| 20 | if echo $* | egrep "\bclean\b"; then |
Jian Li | 8bf6c44 | 2016-04-06 12:01:39 -0700 | [diff] [blame] | 21 | 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 HIGUCHI | 7d8b3b1 | 2016-09-12 13:09:47 -0700 | [diff] [blame] | 25 | SETUP_OPTS="${SETUP_OPTS} clean" |
Jian Li | 8bf6c44 | 2016-04-06 12:01:39 -0700 | [diff] [blame] | 26 | fi |
| 27 | |
Yuta HIGUCHI | 7d8b3b1 | 2016-09-12 13:09:47 -0700 | [diff] [blame] | 28 | onos-setup-karaf $SETUP_OPTS && karaf "$@" |