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

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

fi

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

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

fi

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