mirror of
https://github.com/aleksamagicka/aquacomputer_d5next-hwmon.git
synced 2025-07-23 04:03:00 +02:00
* Update Makefile Add additional targets for building dkms module and integrating existing targets. Signed-off-by: Daniel Clark <megadjc@gmail.com> * Add DKMS Support Adds DKMS support and adds two useful utilities to automate installation and removal of the dkms module. Signed-off-by: Daniel Clark <megadjc@gmail.com> * Add DKMS Documentation. Adds installation instructions for the DKMS Module. All previous targets such as "make checkpath" and "make dev" are supported. Signed-off-by: Daniel Clark <megadjc@gmail.com> * Update Makefile Update formatting Signed-off-by: Daniel Clark <megadjc@gmail.com> --------- Signed-off-by: Daniel Clark <megadjc@gmail.com>
23 lines
567 B
Bash
23 lines
567 B
Bash
#!/bin/bash
|
|
|
|
if [[ $EUID -ne 0 ]]; then
|
|
echo "You must run this with superuser priviliges. Try \"sudo ./dkms-remove.sh\"" 2>&1
|
|
exit 1
|
|
else
|
|
echo "About to run dkms removal steps..."
|
|
fi
|
|
|
|
DRV_NAME="$(basename "$(pwd)" | sed 's/-hwmon$//')"
|
|
DRV_VERSION=$(dkms status ${DRV_NAME} -k $(uname -r) | cut -d, -f1 | cut -d/ -f2)
|
|
|
|
make -f Makefile DRIVER=$DRV_NAME DRIVER_VERSION=$DRV_VERSION dkms_clean
|
|
|
|
RESULT=$?
|
|
if [[ "$RESULT" != "0" ]]; then
|
|
echo "Error occurred while running dkms remove." 2>&1
|
|
else
|
|
echo "Finished running dkms removal steps."
|
|
fi
|
|
|
|
exit $RESULT
|