renamed bthandler to bt, added hardcoded paired_devices file since "bluetoothctl paired-devices" seems unreliable

This commit is contained in:
2020-06-07 20:56:01 +02:00
parent 57d4590b2b
commit 4e36aba9cb
2 changed files with 121 additions and 9 deletions

View File

@ -4,19 +4,28 @@
VERSION = 1.1
# paths
PREFIX = ~/.local/bin/tools
PREFIX = ~/.local/bin
DATA_DIR = ~/.local/share/bt#if changed, needs adjustment in bt as well (defined in the beginning)
SRC = bt
SRC = bthandler
OBJ = $(SRC:.c=.o)
install:
mkdir -p $(DESTDIR)$(PREFIX)
cp -f bthandler $(DESTDIR)$(PREFIX)
chmod 755 $(DESTDIR)$(PREFIX)/bthandler
touch $(DESTDIR)$(PREFIX)/bt_blacklist
mkdir -p $(DATA_DIR)
cp -f bt $(DESTDIR)$(PREFIX)
chmod 755 $(DESTDIR)$(PREFIX)/bt
touch $(DATA_DIR)/blacklist
touch $(DATA_DIR)/paired
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bthandler
rm -f $(DESTDIR)$(PREFIX)/bt_blacklist
rm -f $(DESTDIR)$(PREFIX)/bt
rm -rf $(DATA_DIR)
.PHONY: install uninstall
#clears manual paired devices list and blacklist
clear:
rm -rf $(DATA_DIR)
mkdir -p $(DATA_DIR)
touch $(DATA_DIR)/paired
touch $(DATA_DIR)/blacklist
.PHONY: install uninstall clear