summaryrefslogtreecommitdiff
path: root/watch-versions
diff options
context:
space:
mode:
Diffstat (limited to 'watch-versions')
-rwxr-xr-xwatch-versions17
1 files changed, 16 insertions, 1 deletions
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,^<a href="\(v[0-9]\+\.x/\)">\1</a>.*$,\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='<a href="linux-\([0-9.]\+\)\.tar\.sign">'
;;
'pcmciautils')