Code Review
/
src
/
app-framework-main.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix very bad typo
[src/app-framework-main.git]
/
scripts
/
afm-util
diff --git
a/scripts/afm-util
b/scripts/afm-util
index
f5da0e1
..
60434a7
100755
(executable)
--- a/
scripts/afm-util
+++ b/
scripts/afm-util
@@
-1,11
+1,25
@@
#!/bin/sh
if [ "x" = "x${DBUS_SESSION_BUS_ADDRESS}" ]; then
#!/bin/sh
if [ "x" = "x${DBUS_SESSION_BUS_ADDRESS}" ]; then
- DBUS_SESSION_BUS_ADDRESS
:=unix:path=/run/user/$UID/bus
+ DBUS_SESSION_BUS_ADDRESS
="unix:path=/run/user/$UID/bus"
fi
fi
+export DBUS_SESSION_BUS_ADDRESS
+
+pretty() {
+ sed \
+ -e '/^method return .*/d' \
+ -e 's/^Error org.freedesktop.DBus.Error.Failed: "\?\(.*\)"\?$/ERROR: \1/' \
+ -e 's/^ string "\(.*\)"/\1/' \
+ -e 's/},/&\n/'
+}
send() {
send() {
- dbus-send --session --dest=org.AGL.afm.user --print-reply /org/AGL/afm/user org.AGL.afm.user.$1 "string:$2"
+ dbus-send --session --print-reply \
+ --dest=org.AGL.afm.user \
+ /org/AGL/afm/user \
+ org.AGL.afm.user.$1 \
+ "string:$2" |
+ pretty
}
case "$1" in
}
case "$1" in
@@
-82,8
+96,8
@@
The commands are:
run id
start id start an instance of the widget of id
run id
start id start an instance of the widget of id
-
terminate
rid
-
kill
rid terminate the running instance rid
+
kill
rid
+
terminate
rid terminate the running instance rid
stop rid
pause rid stop the running instance rid
stop rid
pause rid stop the running instance rid
@@
-91,8
+105,8
@@
The commands are:
resume rid
continue rid continue the previously rid
resume rid
continue rid continue the previously rid
- stat
e
rid
- stat
us
rid get status of the running instance rid
+ stat
us
rid
+ stat
e
rid get status of the running instance rid
EOC
;;
EOC
;;