changeset 183:249b37a8c917

Fix fuer Kernel Versionen mit Revision
author Dirk Olmes <dirk.olmes@codedo.de>
date Tue, 22 Dec 2020 12:03:22 +0100
parents d74e3821363e
children 3e3c8aa16bef
files removeKernel
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/removeKernel	Sat Aug 08 11:40:20 2020 +0200
+++ b/removeKernel	Tue Dec 22 12:03:22 2020 +0100
@@ -19,7 +19,7 @@
 
 FULL_VERSION="${MAJOR}.${MINOR}.${MICRO}"
 if [[ "${REVISION}" != "" ]]; then
-	FULL_VERSION=$"{FULL_VERSION}-${REVISION}"
+	FULL_VERSION="${FULL_VERSION}-${REVISION}"
 fi
 
 ARCH=`uname -m`
@@ -38,8 +38,11 @@
 
 # unmerge the kernel
 cd /usr/src
-KERNEL_DIR="linux-${FULL_VERSION}${KERNEL_FLAVOR}"
-if [ -d $KERNEL_DIR ]; then
+KERNEL_DIR="linux-${MAJOR}.${MINOR}.${MICRO}${KERNEL_FLAVOR}"
+if [[ "${REVISION}" != "" ]]; then
+    KERNEL_DIR="${KERNEL_DIR}-${REVISION}"
+fi
+if [[ -d $KERNEL_DIR ]]; then
 	KERNEL_NAME="${KERNEL_EBUILD}-${FULL_VERSION}"
 
     echo "unmerge kernel $KERNEL_NAME" >> $LOGFILE 2>&1