summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmanualPorts/lastVersion.sh20
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!'