diff --git a/install.sh b/install.sh index 87631b6..3c4bc04 100755 --- a/install.sh +++ b/install.sh @@ -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." diff --git a/uninstall.sh b/uninstall.sh index e08f775..67406a6 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -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