From 51143864f85ba64479966438f14e16b913cce982 Mon Sep 17 00:00:00 2001 From: ivanovborislav <81085106+ivanovborislav@users.noreply.github.com> Date: Sat, 7 Jan 2023 10:12:48 +0200 Subject: [PATCH] Update install.sh --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 35cf22b..bbad835 100644 --- a/install.sh +++ b/install.sh @@ -43,6 +43,7 @@ if ! command -v dkms >/dev/null 2>&1;then fi else if [[ ! "$(echo "`dkms status`" | awk '/'${DRVNAME}'/ {print}')" =~ "${DRVSTATUS}" ]];then + make clean; Error=$? if [ -e /usr/src/${DRVNAME}-${DRVVER} ];then if [ "$EUID" != "0" ];then echo "You need root permissions:" @@ -119,7 +120,7 @@ if ! command -v dkms >/dev/null 2>&1;then echo "Module ${DRVNAME} already uninstalled" fi else - if [[ "$(echo "`dkms status`" | awk '/'${DRVNAME}'/ {print}')" =~ "${DRVSTATUS}" ]] || [[ ! -z "$(echo "`dkms status`" | awk '/'${DRVNAME}'/ {print}')" ]];then + if [[ ! -z "$(echo "`dkms status`" | awk '/'${DRVNAME}'/ {print}')" ]];then if [ "$EUID" != "0" ];then echo "You need root permissions:" sudo dkms remove -m ${DRVNAME} -v ${DRVVER} --all; Error=$?