From bab5fc226da866e852f51db67e4387c27e1ba702 Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Thu, 6 Jun 2024 17:48:15 +0200 Subject: pw-prof: PROF_DEV --- pw-prof | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pw-prof b/pw-prof index 82ab6d9..a0bfec1 100755 --- a/pw-prof +++ b/pw-prof @@ -6,11 +6,12 @@ ################################################################################ DEVICES="$(pw-dump | jq 'map(select(.info.props."device.bus" == "bluetooth"))')" -NAME="$(echo "$DEVICES" | jq -r 'map(.info.props."device.alias")[]')" +NAME="$(echo "$DEVICES" | jq -r 'map(.info.props."device.alias")[]' | grep "$PROF_DEV")" NDEVS="$(echo "$NAME" | wc -l)" if [ "$NDEVS" -ne 1 ]; then - echo "ERROR: there should be 1 device, found $NDEVS:\n" + echo "ERROR: there should be 1 device, found $NDEVS:" + echo "(you can filter with the PROF_DEV environment variable)\n" echo "${NAME}" exit 1 fi -- cgit v1.2.3