5 afb-client-demo -H -d unix:@afm_platform_rundir@/apis/ws/afm-main "$verb" "$2" |
6 awk '$1=="ON-REPLY" && $3!="success"{$1="ERROR:";$2="";print > "/dev/stderr";exit 1;}NR>1'
14 set -- $(getopt -l all,force,help,uid: -s afhu: -n afm-util -- "$@")
18 -a|--all) all=true; shift;;
19 -f|--force) force=true; shift;;
20 -h|--help) help=true; shift;;
21 -u|--uid) uid="$2"; shift 2;;
29 -a|--all) echo -n '{"all":true}';;
37 send runnables "{\"all\":$all,\"uid\":$uid}"
43 if [[ "$(basename $0)" = "afm-install" ]]; then r=false; fi
44 send install "{\"wgt\":\"$f\",\"force\":$force,\"reload\":$r}"
49 send uninstall "\"$i\""
54 send detail "{\"id\":$i,\"uid\":$uid}"
58 send runners "{\"all\":$all,\"uid\":$uid}"
63 send start "{\"id\":$i,\"uid\":$uid}"
68 send once "{\"id\":$i,\"uid\":$uid}"
73 send terminate "{\"runid\":$i,\"uid\":$uid}"
78 send state "{\"runid\":$i,\"uid\":$uid}"
83 usage: $(basename $0) command [arg]
88 runnables list the runnable widgets installed
89 option -a or --all for all instances
92 install wgt install the wgt file
95 uninstall id remove the installed widget of id
98 detail id print detail about the installed widget of id
101 runners list the running instance
102 option -a or --all for all instances
105 start id start an instance of the widget of id
107 once id run once an instance of the widget of id
110 terminate rid terminate the running instance rid
113 state rid get status of the running instance rid
119 echo "unknown command $1" >&2