get-fedora-latest-config: allow fetching config from rawhide repository

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

View File

@ -7,6 +7,7 @@ fi
localdir="$(dirname "$(readlink -f "$0")")"
releasever="$1"
testing="$2"
kernelver="$(cat "$localdir/version")"
kernelsrc="linux-$kernelver"
@ -16,7 +17,11 @@ key="$localdir/keys/RPM-GPG-KEY-fedora-$releasever-primary"
[[ "x$releasever" == "x" ]] && { echo "Please provide Fedora release version as first argument, e.g. '29'."; exit 1; }
# baseurl for latest kernel rpm
url="https://dl.fedoraproject.org/pub/fedora/linux/updates/$releasever/Everything/x86_64/Packages/k"
if [ "$testing" == "1" ]; then
url="https://dl.fedoraproject.org/pub/fedora/linux/development/$releasever/Everything/x86_64/os/Packages/k"
else
url="https://dl.fedoraproject.org/pub/fedora/linux/updates/$releasever/Everything/x86_64/Packages/k"
fi
# get the latest kernel rpm
content="$(curl "$url/")"