comparison removeKernel @ 161:4500455b2375

Adjust filenames to the old pattern
author Dirk Olmes <dirk@xanthippe.ping.de>
date Tue, 07 Jan 2020 15:27:52 +0100
parents c35d56590441
children 5da4de3d7ee1
comparison
equal deleted inserted replaced
160:c35d56590441 161:4500455b2375
60 ARCH=`uname -m` 60 ARCH=`uname -m`
61 if [ "$ARCH" = "i686" ]; then 61 if [ "$ARCH" = "i686" ]; then
62 ARCH="x86" 62 ARCH="x86"
63 fi 63 fi
64 64
65 SUFFIX=genkernel-${ARCH}-${MAJOR}.${MINOR}.${MICRO}-gentoo 65 SUFFIX_V3="genkernel-${ARCH}-${MAJOR}.${MINOR}.${MICRO}"
66 if [ "$REVISION" != "" ]; then 66 if [[ "${REVISION}" != "" ]]; then
67 SUFFIX="$SUFFIX-${REVISION}" 67 SUFFIX_V3="${SUFFIX_V3}-${REVISION}"
68 fi 68 fi
69 rm System.map-${SUFFIX} >> $LOGFILE 2>&1 69 SUFFIX_V3="${SUFFIX_V3}-gentoo"
70 rm initramfs-${SUFFIX} >> $LOGFILE 2>&1
71 70
72 KERNEL="kernel-${SUFFIX}" 71 SUFFIX_V4="${MAJOR}.${MINOR}.${MICRO}"
72 if [ "${REVISION}" != "" ]; then
73 SUFFIX_V4="${SUFFIX_V4}-${REVISION}"
74 fi
75 SUFFIX_V4="${SUFFIX_V4}-gentoo-${ARCH}"
76
77 SYSTEM_MAP="System.map-${SUFFIX_V3}"
78 if [[ -f $SYSTEM_MAP ]]; then
79 rm ${SYSTEM_MAP} >> $LOGFILE 2>&1
80 fi
81 SYSTEM_MAP="System.map-${SUFFIX_V4}"
82 if [[ -f ${SYSTEM_MAP} ]]; then
83 rm ${SYSTEM_MAP} >> $LOGFILE 2>&1
84 fi
85 if [[ -f ${SYSTEM_MAP}.old ]]; then
86 rm ${SYSTEM_MAP}.old >> $LOGFILE 2>&1
87 fi
88
89 INITRAMFS="initramfs-${SUFFIX_V3}"
90 if [[ -f ${INITRAMFS} ]]; then
91 rm ${INITRAMFS} >> $LOGFILE 2>&1
92 fi
93 INITRAMFS="initramfs-${SUFFIX_V4}"
94 if [[ -f ${INITRAMFS} ]]; then
95 rm ${INITRAMFS} >> $LOGFILE 2>&1
96 fi
97 if [[ -f ${INITRAMFS}.old ]]; then
98 rm ${INITRAMFS}.old >> $LOGFILE 2>&1
99 fi
100
101 KERNEL="kernel-${SUFFIX_V3}"
73 if [[ -f $KERNEL ]]; then 102 if [[ -f $KERNEL ]]; then
74 rm $KERNEL >> $LOGFILE 2>&1 103 rm $KERNEL >> $LOGFILE 2>&1
75 fi 104 fi
76 KERNEL="vmlinuz-${MAJOR}.${MINOR}.${MICRO}-gentoo-${ARCH}" 105 KERNEL="vmlinuz-${SUFFIX_V4}"
77 if [[ -f $KERNEL ]]; then 106 if [[ -f $KERNEL ]]; then
78 rm $KERNEL >> $LOGFILE 2>&1 107 rm $KERNEL >> $LOGFILE 2>&1
108 fi
109 if [[ -f $KERNEL.old ]]; then
110 rm $KERNEL.old >> $LOGFILE 2>&1
79 fi 111 fi
80 112
81 # if we got until here, just remove the logfile again 113 # if we got until here, just remove the logfile again
82 rm $LOGFILE 114 rm $LOGFILE