| # ----------------------------------------------------------------------------- |
| # Finds an app in the system. |
| # ----------------------------------------------------------------------------- |
| [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 |
| . $ONOS_ROOT/tools/build/envDefaults |
| trap "rm -f $aux 2>/dev/null" EXIT |
| onos $target "onos:apps" | tee $aux |
| appString=`cat $aux | grep "name=$app,"` |
| if [[ ${appString:0:1} == '*' ]] |
| for token in '$appString' |
| echo "@stc ${id}Id=${token}" |
| echo "@stc ${id}State=${state}" |