4 afb-client-demo -H -d unix:@afm_platform_rundir@/apis/ws/afm-main "$1" "$2" |
5 awk '$1=="ON-REPLY" && $3!="success"{$1="ERROR:";$2="";print > "/dev/stderr";exit 1;}NR>1'
10 -a|--all) echo -n '{"all":true}';;
18 send runnables $(getall $2)
24 if [[ "$(basename $0)" = "afm-install" ]]; then r=false; fi
25 send install '{"wgt":"'"$f"'","force":true,"reload":'"$r"'}'
30 send uninstall "\"$i\""
39 send runners $(getall $2)
47 run-remote|start-remote)
49 send start '{"id":"'"$i"'","mode":"remote"}'
69 usage: $(basename $0) command [arg]
74 runnables list the runnable widgets installed
75 option -a or --all for all instances
78 install wgt install the wgt file
81 uninstall id remove the installed widget of id
84 detail id print detail about the installed widget of id
87 runners list the running instance
88 option -a or --all for all instances
91 start id start an instance of the widget of id
93 once id run once an instance of the widget of id
96 terminate rid terminate the running instance rid
99 state rid get status of the running instance rid
105 echo "unknown command $1" >&2