X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=scripts%2Fafm-util.in;h=2cc714b8a10aa4b6bcb75da9a615db96f560cf87;hb=a44e30483fc1b9b1e7535861f0d2c9ad4f771782;hp=3f47d979562a119feaaf51531bc708728f3c389f;hpb=5f7901dcb8519fe1d553bffda803a8d8da8e5af5;p=src%2Fapp-framework-main.git diff --git a/scripts/afm-util.in b/scripts/afm-util.in index 3f47d97..2cc714b 100755 --- a/scripts/afm-util.in +++ b/scripts/afm-util.in @@ -5,10 +5,17 @@ send() { awk '$1=="ON-REPLY" && $3!="success"{$1="ERROR:";$2="";print > "/dev/stderr";exit 1;}NR>1' } +getall() { + case "$1" in + -a|--all) echo -n '{"all":true}';; + *) echo -n true;; + esac +} + case "$1" in list|runnables) - send runnables true + send runnables $(getall $2) ;; add|install) @@ -29,7 +36,7 @@ case "$1" in ;; ps|runners) - send runners true + send runners $(getall $2) ;; run|start) @@ -52,16 +59,6 @@ case "$1" in send terminate "$i" ;; - stop|pause) - i=$2 - send pause "$i" - ;; - - resume|continue) - i=$2 - send resume "$i" - ;; - state|status) i=$2 send state "$i" @@ -75,6 +72,7 @@ The commands are: list runnables list the runnable widgets installed + option -a or --all for all instances add wgt install wgt install the wgt file @@ -87,6 +85,7 @@ The commands are: ps runners list the running instance + option -a or --all for all instances run id start id start an instance of the widget of id @@ -96,12 +95,6 @@ The commands are: kill rid terminate rid terminate the running instance rid - stop rid - pause rid pause the running instance rid - - resume rid - continue rid continue the previously paused rid - status rid state rid get status of the running instance rid