Skip to content

Commit

Permalink
xpadneo, installer: Allow forcing replacement of a newer kernel module
Browse files Browse the repository at this point in the history
Signed-off-by: Kai Krakow <[email protected]>
  • Loading branch information
kakra committed Dec 12, 2024
1 parent c88f29a commit 47b03ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [[ -z "${INSTALLED[*]}" ]]; then
cp --recursive "${V[@]}" hid-xpadneo/. "/usr/src/hid-xpadneo-${VERSION}/."

echo "* installing module (using DKMS)"
dkms install "${V[*]}" "hid-xpadneo/${VERSION}" --force || cat_dkms_make_log
dkms install "${V[*]}" "${FORCE}" "hid-xpadneo/${VERSION}" || cat_dkms_make_log

else

Expand Down
6 changes: 5 additions & 1 deletion lib/options.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
#!/bin/bash

# shellcheck disable=SC2046
OPTIONS=$(getopt --name "$0" --longoptions "kernelsourcedir:,verbose" -- "" "$@") || exit 1
OPTIONS=$(getopt --name "$0" --longoptions "force,kernelsourcedir:,verbose" -- "" "$@") || exit 1
# shellcheck disable=SC2086
eval set -- $OPTIONS

while true; do
case "$1" in
--force)
# shellcheck disable=SC2034
FORCE="--force"
;;
--kernelsourcedir)
shift
# shellcheck disable=SC2034
Expand Down

0 comments on commit 47b03ce

Please sign in to comment.