Check if DKMS is installed in install.sh and uninstall.sh.

This commit is contained in:
Julian Frohmüller
2023-02-20 21:24:03 +01:00
parent d2c9fa0a1a
commit 622d406d5e
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -47,6 +47,12 @@ else
echo "Install succeeded."
fi
if ! command -v dkms >/dev/null; then
echo "WARNING: DKMS is not installed, skipping driver installation."
echo "To use the advanced features of OpenSuperClone you will have to install the driver manually."
exit 0
fi
VERSION=$(grep -oP '(?<=set\(OSC_DRIVER_VERSION ).*(?=\))' ../CMakeLists.txt)
VERSION=$(echo $VERSION | cut -d' ' -f1)
echo "Found OSCDriver version $VERSION."
+6
View File
@@ -39,6 +39,12 @@ fi
echo "Done uninstalling OpenSuperClone from /usr/..."
if ! command -v dkms >/dev/null; then
echo "WARNING: DKMS is not installed, skipping driver removal."
echo "If the driver was installed manually, it will not be removed."
exit 0
fi
echo "Uninstalling OSCDriver..."
if lsmod | grep -q oscdriver; then