summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorEddy Pedroni <epedroni@pm.me>2024-01-21 19:22:59 +0100
committerEddy Pedroni <epedroni@pm.me>2024-01-21 19:22:59 +0100
commitda3503a14bb84f6c2767829431843a887aff2241 (patch)
treee23f29701e384385826b94430dcfd0c96a861c76 /Makefile
parent7df31aef7d84c32e88c12805e325626409902cd8 (diff)
Replace shell script with python script, implement all basic functionality
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index e858a74..2511f0a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,23 @@
UDEV_RULE_DIR := /etc/udev/rules.d
RULES_FILE := 50-docking-station.rules
-$(UDEV_RULE_DIR)/$(RULES_FILE): $(RULES_FILE)
- @echo "Installing udev rules (requires root access)"
- sudo install --owner=root --group=root --mode=644 -t $(UDEV_RULE_DIR) $(RULES_FILE)
+SCRIPT_DIR := /usr/local/bin
+SCRIPT := dock-action.py
-install: $(UDEV_RULE_DIR)/$(RULES_FILE)
+install: $(UDEV_RULE_DIR)/$(RULES_FILE) $(SCRIPT_DIR)/$(SCRIPT)
uninstall:
@echo "Removing udev rules (requires root access)"
sudo rm "$(UDEV_RULE_DIR)/$(RULES_FILE)"
+ @echo "Removing script (requires root access)"
+ sudo rm "$(SCRIPT_DIR)/$(SCRIPT)"
+
+$(UDEV_RULE_DIR)/$(RULES_FILE): $(RULES_FILE)
+ @echo "Installing udev rules (requires root access)"
+ sudo install --owner=root --group=root --mode=644 -t $(UDEV_RULE_DIR) $(RULES_FILE)
+
+$(SCRIPT_DIR)/$(SCRIPT): $(SCRIPT)
+ @echo "Installing script (requires root access)"
+ sudo install --owner=root --group=root --mode=755 -t $(SCRIPT_DIR) $(SCRIPT)
.PHONY: install uninstall