diff options
author | Erich Eckner <git@eckner.net> | 2021-03-25 22:11:20 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-03-25 22:11:20 +0100 |
commit | 6124637f28355e1d8c8bd427539b8e96dd191231 (patch) | |
tree | c5964a227e91031463bbfb7fa7f66279802aff51 /manualPorts | |
parent | efaba27fc5d673ad2e20da952ace40970615c546 (diff) | |
download | crux-ports-6124637f28355e1d8c8bd427539b8e96dd191231.tar.xz |
manualPorts/lastVersion.sh: fix #kernel and some cleanup
Diffstat (limited to 'manualPorts')
-rwxr-xr-x | manualPorts/lastVersion.sh | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/manualPorts/lastVersion.sh b/manualPorts/lastVersion.sh index ca7ca38..c93ce52 100755 --- a/manualPorts/lastVersion.sh +++ b/manualPorts/lastVersion.sh @@ -25,9 +25,17 @@ fi if [ "$1" == "#kernel" ] then - latestKernelVersion="$(makekernel -s)" - currentKernelVersion="$(\ - uname -r)" + latestKernelVersion=$(makekernel -s) + currentKernelVersion=$( + ls /boot \ + | sed ' + s@^vmlinuz-\([0-9.]\+\)$@\1@ + t + d + ' \ + | sort -V \ + | tail -n1 + ) [ "${currentKernelVersion}" == "${latestKernelVersion}" ] || \ [ "${currentKernelVersion}" == "${latestKernelVersion}.0" ] || \ @@ -35,11 +43,11 @@ then exit 0 fi -base="$(dirname $0)" +base=$(dirname "$0") -if [ -x ${base}/$1/lastVersion.sh ] +if [ -x "${base}/$1/lastVersion.sh" ] then - newestVersion="$(${base}/$1/lastVersion.sh)" + newestVersion=$("${base}/$1/lastVersion.sh") if [ -z "${newestVersion}" ] then echo "${base}/$1/lastVersion.sh"' gibt keine Version zurück!' |