list.sh

Allows to see the list of active context or connected repeaters

Command line parameters:

  • -c Get active context list
  • -r Get connected repeater list


<syntaxhighlight lang="bash">

  1. !/bin/bash

CALL="dbus-send --system --dest=me.burnaway.BrandMeister --type=method_call --print-reply /me/burnaway/BrandMeister"

if [ "$1" == "-c" ] then

  1. echo
  2. echo BrandMeister context list:
  3. echo
  1. $CALL me.burnaway.BrandMeister.getContextList | \
  2. grep -E -o "[a-z0-9-]{36}" | \
  3. xargs -l -I {} \
  4. $CALL me.burnaway.BrandMeister.getContextData string:'{}'
  1. exit

fi

if [ "$1" == "-r" ] then

  1. echo
  2. echo BrandMeister repeater list:
  3. echo
  4. $CALL me.burnaway.BrandMeister.getContextList uint32:2 | \
  5. grep -E -o "[a-z0-9-]{36}" | \
  6. xargs -l -I {} \
  7. $CALL me.burnaway.BrandMeister.getRepeaterData string:'{}'
  1. exit

fi

echo echo Usage: echo $0 -c Get active context list echo $0 -r Get connected repeater list echo </syntaxhighlight>