commit 3b80b94226a5c27b5332c996f7fdc3a436c2e328 parent 5cb9bfdc4170d54f7058e20a1e39765c0afc02ee Author: Antoine Amarilli <a3nm@a3nm.net> Date: Tue, 3 Jan 2017 14:55:49 +0100 bluetooth_fuse Diffstat:
bluetooth_fuse | | | 19 | +++++++++++++++++++ |
1 file changed, 19 insertions(+), 0 deletions(-)
diff --git a/bluetooth_fuse b/bluetooth_fuse @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e +set -x +FILE="$HOME/config/private/bluetooth" +DEVICE="$1" +MNT="$HOME/$DEVICE" +HW=$(grep "^$DEVICE\s" "$FILE" | cut -d' ' -f2) +if [[ -z "$HW" ]] +then + >&2 echo "no registered device $DEVICE in $FILE" + >&2 echo "try adding one from paired devices?" + # echo "paired-devices" | bluetoothctl 2>/dev/null | grep '^Device' + exit 2 +fi + +mkdir -p "$MNT" +obexfs -b "$HW" "$MNT" +