aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpw-prof5
1 files 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