index : devops | |
Archlinux32 devs' convenience-scripts | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-03-05 14:36:40 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-03-05 14:36:40 +0100 |
commit | a16fafef9916d4650807734e64a8ef2dcea38493 (patch) | |
tree | b8690e9d13cea50c8205eaec066b4468a199cbbc | |
parent | 297ac8db50a2514b8da2c461bc15ede7885e6408 (diff) |
-rwxr-xr-x | watch-versions | 17 |
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') |