diff options
Diffstat (limited to 'pw-prof')
-rwxr-xr-x | pw-prof | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |