From a16fafef9916d4650807734e64a8ef2dcea38493 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 5 Mar 2019 14:36:40 +0100 Subject: watch-versions: kernel may start with 5. nowadays ;-P --- watch-versions | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'watch-versions') diff --git a/watch-versions b/watch-versions index 8c0dac1..c46f42a 100755 --- a/watch-versions +++ b/watch-versions @@ -56,7 +56,22 @@ oldver=$( case "${pkgbase}" in 'linux-pae') - url='https://www.kernel.org/pub/linux/kernel/v4.x/' + url=$( + curl -LSs 'https://www.kernel.org/pub/linux/kernel' \ + | sed ' + s,^\1.*$,\1, + t + d + ' \ + | sort -Vr \ + | while read -r sub; do + if curl -ILs "https://www.kernel.org/pub/linux/kernel/${sub}/sha256sums.asc" \ + | grep -qFw 'HTTP/1.1 200 OK'; then + echo "https://www.kernel.org/pub/linux/kernel/${sub}" + break + fi + done + ) regex='' ;; 'pcmciautils') -- cgit v1.2.3-70-g09d2