Skip to content

Commit

Permalink
xpadneo, installer: Use make to regenerate dkms.conf
Browse files Browse the repository at this point in the history
Signed-off-by: Kai Krakow <kai@kaishome.de>
  • Loading branch information
kakra committed Dec 23, 2024
1 parent d8e6077 commit dccb4a4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions hid-xpadneo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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' <"$<" >"$@"
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [[ ! -d /sys/devices/virtual/misc/uhid ]]; then
fi

echo "* creating dkms.conf"
sed 's/"@DO_NOT_CHANGE@"/"'"${VERSION}"'"/g' <hid-xpadneo/dkms.conf.in >hid-xpadneo/dkms.conf
make -C hid-xpadneo "${MAKE_OPTS[@]}" dkms.conf

echo "* registering module"
dkms add "${V[@]}" "hid-xpadneo" || maybe_already_installed
Expand Down
2 changes: 2 additions & 0 deletions lib/options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ while true; do
shift
done

# shellcheck disable=SC2034
[ ${#V[*]} -gt 0 ] || MAKE_OPTS=("-s")
[ ${#V[*]} -eq 0 ] || set -x

0 comments on commit dccb4a4

Please sign in to comment.