From c19cb8e89128df85ba8fa778e3471796a9451a7b Mon Sep 17 00:00:00 2001 From: Kai Krakow Date: Wed, 18 Dec 2024 23:39:41 +0100 Subject: [PATCH] xpadneo, installer: Use make to regenerate dkms.conf Signed-off-by: Kai Krakow --- hid-xpadneo/Makefile | 3 +++ install.sh | 2 +- lib/options.sh | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hid-xpadneo/Makefile b/hid-xpadneo/Makefile index fdd3b616..84b27527 100644 --- a/hid-xpadneo/Makefile +++ b/hid-xpadneo/Makefile @@ -15,3 +15,6 @@ reinstall: modules sudo make modules_install sudo rmmod hid-xpadneo || true sudo modprobe hid-xpadneo $(MOD_PARAMS) + +dkms.conf: dkms.conf.in ../VERSION + sed 's/"@DO_NOT_CHANGE@"/"$(shell cat ../VERSION)"/g' <"$<" >"$@" diff --git a/install.sh b/install.sh index f5df075d..8abf5b2a 100755 --- a/install.sh +++ b/install.sh @@ -13,7 +13,7 @@ fi set -e echo "* creating dkms.conf" -sed 's/"@DO_NOT_CHANGE@"/"'"${VERSION}"'"/g' hid-xpadneo/dkms.conf +make -C hid-xpadneo "${MAKE_OPTS[@]}" dkms.conf echo "* registering module" dkms add "${V[@]}" "hid-xpadneo" || maybe_already_installed diff --git a/lib/options.sh b/lib/options.sh index d421748f..fdd346a9 100644 --- a/lib/options.sh +++ b/lib/options.sh @@ -32,4 +32,6 @@ while true; do shift done +# shellcheck disable=SC2034 +[ ${#V[*]} -gt 0 ] || MAKE_OPTS=("-s") [ ${#V[*]} -gt 0 ] && set -x