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 | |
Jian Li | 8bf6c44 | 2016-04-06 12:01:39 -0700 | [diff] [blame^] | 7 | # FIXME: temporarily fix 500 error in GUI, need to be improved with a better way |
| 8 | if 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 |
| 14 | fi |
| 15 | |
Thomas Vachuska | fcd6114 | 2015-04-23 13:59:08 -0700 | [diff] [blame] | 16 | onos-setup-karaf && karaf "$@" |