Refactor Fedora support
This commit is contained in:
parent
ced69c3303
commit
4ed68f2174
32
quickget
32
quickget
@ -507,27 +507,29 @@ function get_freebsd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_fedora() {
|
function get_fedora() {
|
||||||
# For future releases, use dvd1 iso files.
|
local FEDORA_RELEASE=""
|
||||||
|
local FEDORA_VERSIONS=""
|
||||||
|
local ISO=""
|
||||||
local URL=""
|
local URL=""
|
||||||
local VERSION=""
|
local SHA256SUM=""
|
||||||
|
local VERSION_NUM=""
|
||||||
|
local RELEASES=""
|
||||||
|
|
||||||
case ${RELEASE} in
|
RELEASES=$(releases_fedora)
|
||||||
33|34|35_beta) VERSION=${RELEASE};;
|
if [[ "${RELEASES}" != *"${RELEASE}"* ]]; then
|
||||||
*)
|
echo "ERROR! Fedora ${RELEASE} is not a supported release."
|
||||||
echo "ERROR! Fedora ${RELEASE} is not a supported release."
|
echo "${RELEASES}"
|
||||||
releases_fedora
|
exit 1
|
||||||
exit 1
|
fi
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
FEDORA_VERSIONS=$(wget -q -O- "https://getfedora.org/releases.json" | jq '.[] | select((.variant=="Workstation" or .variant=="Spins") and .arch=="x86_64")')
|
FEDORA_VERSIONS=$(wget -q -O- "https://getfedora.org/releases.json" | jq '.[] | select((.variant=="Workstation" or .variant=="Spins") and .arch=="x86_64")')
|
||||||
if [[ $VERSION == *"beta"* ]]; then
|
if [[ "${RELEASE}" == *"beta"* ]]; then
|
||||||
VERSION_NUM=${VERSION%"_beta"}
|
VERSION_NUM=${RELEASE%"_beta"}
|
||||||
FEDORA_RELEASE=$(echo ${FEDORA_VERSIONS} | jq -c '. | select(.version | contains("Beta"))' | jq '. | select(.variant=="Workstation")')
|
FEDORA_RELEASE=$(echo "${FEDORA_VERSIONS}" | jq -c '. | select(.version | contains("Beta"))' | jq '. | select(.variant=="Workstation")')
|
||||||
ISO="Fedora-Workstation-Live-x86_64-${VERSION_NUM}_Beta-1.2.iso"
|
ISO="Fedora-Workstation-Live-x86_64-${VERSION_NUM}_Beta-1.2.iso"
|
||||||
else
|
else
|
||||||
FEDORA_RELEASE=$(echo ${FEDORA_VERSIONS} | jq '. | select(.variant=="Workstation" and .version=="'${VERSION}'")')
|
FEDORA_RELEASE=$(echo "${FEDORA_VERSIONS}" | jq '. | select(.variant=="Workstation" and .version=="'${RELEASE}'")')
|
||||||
ISO="Fedora-Workstation-Live-x86_64-${VERSION}-1.2.iso"
|
ISO="Fedora-Workstation-Live-x86_64-${RELEASE}-1.2.iso"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
URL=$(echo "${FEDORA_RELEASE}" | jq -r '.link')
|
URL=$(echo "${FEDORA_RELEASE}" | jq -r '.link')
|
||||||
|
Loading…
Reference in New Issue
Block a user