aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillermo Ramos2024-06-06 17:48:15 +0200
committerGuillermo Ramos2025-09-08 08:56:11 +0200
commitbab5fc226da866e852f51db67e4387c27e1ba702 (patch)
tree84c5a46bac26c7de652468b41f2b553c76b6540e
parenta6da875f34b04590151411fd7a53ff6fad887423 (diff)
downloadcli-bab5fc226da866e852f51db67e4387c27e1ba702.tar.gz
pw-prof: PROF_DEV
-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