Mercurial > hg > zsh-env
comparison removeKernel @ 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 | 8af0a6219353 |
children |
comparison
equal
deleted
inserted
replaced
182:d74e3821363e | 183:249b37a8c917 |
---|---|
17 REVISION=$4 | 17 REVISION=$4 |
18 fi | 18 fi |
19 | 19 |
20 FULL_VERSION="${MAJOR}.${MINOR}.${MICRO}" | 20 FULL_VERSION="${MAJOR}.${MINOR}.${MICRO}" |
21 if [[ "${REVISION}" != "" ]]; then | 21 if [[ "${REVISION}" != "" ]]; then |
22 FULL_VERSION=$"{FULL_VERSION}-${REVISION}" | 22 FULL_VERSION="${FULL_VERSION}-${REVISION}" |
23 fi | 23 fi |
24 | 24 |
25 ARCH=`uname -m` | 25 ARCH=`uname -m` |
26 if [ "$ARCH" = "i686" ]; then | 26 if [ "$ARCH" = "i686" ]; then |
27 ARCH="x86" | 27 ARCH="x86" |
36 | 36 |
37 LOGFILE=/tmp/removeKernel-$$.log | 37 LOGFILE=/tmp/removeKernel-$$.log |
38 | 38 |
39 # unmerge the kernel | 39 # unmerge the kernel |
40 cd /usr/src | 40 cd /usr/src |
41 KERNEL_DIR="linux-${FULL_VERSION}${KERNEL_FLAVOR}" | 41 KERNEL_DIR="linux-${MAJOR}.${MINOR}.${MICRO}${KERNEL_FLAVOR}" |
42 if [ -d $KERNEL_DIR ]; then | 42 if [[ "${REVISION}" != "" ]]; then |
43 KERNEL_DIR="${KERNEL_DIR}-${REVISION}" | |
44 fi | |
45 if [[ -d $KERNEL_DIR ]]; then | |
43 KERNEL_NAME="${KERNEL_EBUILD}-${FULL_VERSION}" | 46 KERNEL_NAME="${KERNEL_EBUILD}-${FULL_VERSION}" |
44 | 47 |
45 echo "unmerge kernel $KERNEL_NAME" >> $LOGFILE 2>&1 | 48 echo "unmerge kernel $KERNEL_NAME" >> $LOGFILE 2>&1 |
46 emerge --unmerge $KERNEL_NAME >> $LOGFILE 2>&1 | 49 emerge --unmerge $KERNEL_NAME >> $LOGFILE 2>&1 |
47 | 50 |