get-fedora-latest-config: don't hardcode Fedora version in regex rpm

This commit is contained in:
Frédéric Pierret (fepitre) 2019-03-15 22:28:53 +01:00
parent fe376beae2
commit 924b8ab901
No known key found for this signature in database
GPG Key ID: 484010B5CDC576E2

View File

@ -20,7 +20,7 @@ url="https://dl.fedoraproject.org/pub/fedora/linux/updates/$releasever/Everythin
# get the latest kernel rpm
content="$(curl "$url/")"
latestrpm="$(echo "$content" | sed -e 's/<[^>]*>//g' | awk '{print $1}' | grep -E "kernel-core-[0-9]+.[0-9]+.[0-9]+-[0-9]+.fc29.x86_64.rpm")"
latestrpm="$(echo "$content" | sed -e 's/<[^>]*>//g' | awk '{print $1}' | grep -E "kernel-core-[0-9]+.[0-9]+.[0-9]+-[0-9]+.fc$releasever.x86_64.rpm")"
latestver="$(echo "$latestrpm" | sed 's/kernel-core-//; s/\.rpm//')"
if [ "x$latestrpm" != "x" ]; then