From 3476b426fb3443ff909f8d607934e59601c7d508 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Tue, 19 Mar 2019 23:21:35 +0100 Subject: Add ability to manage all widget/applications For system uses -like automatic testing-, it is needed to include tha ability to list ALL installed widgets and ALL running instance of installed widgets. This change adds the option -a or --all to the commands 'list' and 'runners' for the purpose of listing any installed widgets, even those requiring to be hidden. Example: afm-util ps -a Bug-AGL: SPEC-2272 Bug-AGL: SPEC-1850 Change-Id: I216ec9c63efea1b3af58e1d2d7723d986e04551e Signed-off-by: Jose Bollo --- scripts/afm-util.in | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'scripts/afm-util.in') diff --git a/scripts/afm-util.in b/scripts/afm-util.in index 3f47d97..978f000 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) @@ -75,6 +82,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 +95,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 -- cgit 1.2.3-korg