aboutsummaryrefslogtreecommitdiff
path: root/contrib/taler-mdb-show.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/taler-mdb-show.sh')
-rw-r--r--contrib/taler-mdb-show.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/contrib/taler-mdb-show.sh b/contrib/taler-mdb-show.sh
new file mode 100644
index 0000000..a050002
--- /dev/null
+++ b/contrib/taler-mdb-show.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+set -eu
+
+function cleanup()
+{
+ taler-mdb-display-off -c "$CONF" -i
+ exit 0
+}
+
+trap cleanup EXIT
+
+CONF="$HOME/.config/taler.conf"
+
+# Parse command-line options
+while getopts ':c:h' OPTION; do
+ case "$OPTION" in
+ c)
+ CONF="$OPTARG"
+ ;;
+ h)
+ echo 'Supported options:'
+ # shellcheck disable=SC2016
+ echo ' -c $CONF -- set configuration'
+ ;;
+ ?)
+ exit_fail "Unrecognized command line option"
+ ;;
+ esac
+done
+
+taler-mdb-display-on -c "$CONF"
+
+FBDEV=$(taler-config -c "$CONF" -s taler-mdb -o FRAMEBUFFER_DEVICE)
+
+fbi -d "$FBDEV" -a -m "768x576-75" -vt 2 -nocomments -noverbose "$1.png"
+
+while true
+do
+ sleep 10
+done