From 850c8966cf0941e09c2897bbc8cc33f41a3f7ed1 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 13 Dec 2024 11:42:41 -0400 Subject: [PATCH] Thats better --- Makefile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 84a5943..2b1a7f0 100644 --- a/Makefile +++ b/Makefile @@ -100,25 +100,28 @@ dependencies: spirilink-driver: @read -p "Is SpiriLink using 8812EU or 8812AU? Enter EU/AU: " driver; \ if [ "$$driver" = "EU" ] || [ "$$driver" = "eu" ]; then \ - $(MAKE) spirilink-driver DRIVER_TYPE=EU; \ + export DRIVER_TYPE=EU; \ elif [ "$$driver" = "AU" ] || [ "$$driver" = "au" ]; then \ - $(MAKE) spirilink-driver DRIVER_TYPE=AU; \ + export DRIVER_TYPE=AU; \ else \ echo "Invalid input. Skipping SpiriLink driver installation."; \ - $(SUDO) mkdir -p ~/tmp - @if [ "$(DRIVER_TYPE)" = "EU" ]; then \ + exit 1; \ + fi; \ + $(SUDO) mkdir -p ~/tmp; \ + if [ "$$DRIVER_TYPE" = "EU" ]; then \ echo "Installing SpiriLink 8812EU driver..."; \ git clone -b v5.15.0.1 https://github.com/svpcom/rtl8812eu.git ~/tmp/rtl8812eu && \ cd ~/tmp/rtl8812eu && $(SUDO) ./dkms-install.sh; \ - elif [ "$(DRIVER_TYPE)" = "AU" ]; then \ + elif [ "$$DRIVER_TYPE" = "AU" ]; then \ echo "Installing SpiriLink 8812AU driver..."; \ git clone -b v5.2.20 https://github.com/svpcom/rtl8812au.git ~/tmp/rtl8812au && \ cd ~/tmp/rtl8812au && $(SUDO) ./dkms-install.sh; \ else \ - echo "Unknown driver type: $(DRIVER_TYPE). Skipping driver installation."; \ + echo "Unknown driver type: $$DRIVER_TYPE. Skipping driver installation."; \ fi; @echo "SpiriLink driver installation complete." + # Configure SpiriLink interface .PHONY: configure-spirilink configure-spirilink: