aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/CMakeLists.txt1
-rwxr-xr-x[-rw-r--r--]scripts/afm-debug0
l---------scripts/afm-install1
-rwxr-xr-xscripts/afm-util30
4 files changed, 4 insertions, 28 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index bf0846c..e0f80ac 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -20,6 +20,7 @@ cmake_minimum_required(VERSION 2.8)
if(NOT USE_SDK)
install(PROGRAMS afm-util DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(PROGRAMS afm-install DESTINATION ${CMAKE_INSTALL_BINDIR})
if(AGL_DEVEL)
install(PROGRAMS afm-debug DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
diff --git a/scripts/afm-debug b/scripts/afm-debug
index 18ecae2..18ecae2 100644..100755
--- a/scripts/afm-debug
+++ b/scripts/afm-debug
diff --git a/scripts/afm-install b/scripts/afm-install
new file mode 120000
index 0000000..5bde063
--- /dev/null
+++ b/scripts/afm-install
@@ -0,0 +1 @@
+afm-util \ No newline at end of file
diff --git a/scripts/afm-util b/scripts/afm-util
index bbab51b..4d86218 100755
--- a/scripts/afm-util
+++ b/scripts/afm-util
@@ -1,34 +1,8 @@
#!/bin/bash
-if [ "x" = "x${DBUS_SESSION_BUS_ADDRESS}" ]; then
- DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$UID/bus"
-fi
-export DBUS_SESSION_BUS_ADDRESS
-
-pretty() {
- sed ' /^method return .*/d
- s/^Error org.freedesktop.DBus.Error.Failed: "\?\(.*\)"\?$/ERROR: \1/
- s/^ string "\(.*\)"/\1/
- s:[[{,]:&\n:g
- s: *[]}]:\n&:g
- ' |
- sed ' s:^ *::
- s: *$::
- /[]}],*$/ {x;s:...::;x}
- G
- /[[{]\n/ {x;s:$: :;x}
- s:^\(.*[^\n]\)\n\( *\)$:\2\1:
- '
-}
-
send() {
- dbus-send --session --print-reply \
- --dest=org.AGL.afm.user \
- /org/AGL/afm/user \
- org.AGL.afm.user.$1 \
- "string:$2" |
- pretty
- return ${PIPESTATUS[0]}
+ afb-client-demo -H -d unix:/run/afm/apis/ws/afm-main "$1" "$2" |
+ awk '$1=="ON-REPLY-FAIL"{$1="ERROR:";$2="";print;exit 1;}NR>1'
}
case "$1" in