]> git.saurik.com Git - apt.git/blobdiff - debian/apt.auto-removal.sh
releasing package apt version 1.1~exp12
[apt.git] / debian / apt.auto-removal.sh
index ab8201898f58382ac68af628637b278ae3fdd7cc..807c6f745b8b2d87bf0b2e5a90b7f27fc9cf8b94 100644 (file)
@@ -41,7 +41,7 @@ version_test_gt ()
        return "$?"
 }
 
-list="$(${DPKG} -l | awk '/^ii[ ]+(linux|kfreebsd|gnumach)-image-[0-9]*/ && $2 !~ /-dbg$/ { print $2 }' | sed -e 's#\(linux\|kfreebsd\|gnumach\)-image-##')"
+list="$(${DPKG} -l | awk '/^ii[ ]+(linux|kfreebsd|gnumach)-image-[0-9]+\./ && $2 !~ /-dbg$/ { print $2 }' | sed -e 's#\(linux\|kfreebsd\|gnumach\)-image-##')"
 
 latest_version=""
 previous_version=""
@@ -63,13 +63,10 @@ then
        previous_version=
 fi
 
-kernels=$(sort -u <<EOF
-$latest_version
+kernels="$(echo "$latest_version
 $installed_version
 $running_version
-$previous_version
-EOF
-)
+$previous_version" | sort -u | sed -e 's#\.#\\.#g' )"
 
 generateconfig() {
        cat <<EOF