mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Refactor Fedora support
This commit is contained in:
parent
ced69c3303
commit
4ed68f2174
1 changed files with 17 additions and 15 deletions
32
quickget
32
quickget
|
@ -507,27 +507,29 @@ function get_freebsd() {
|
|||
}
|
||||
|
||||
function get_fedora() {
|
||||
# For future releases, use dvd1 iso files.
|
||||
local FEDORA_RELEASE=""
|
||||
local FEDORA_VERSIONS=""
|
||||
local ISO=""
|
||||
local URL=""
|
||||
local VERSION=""
|
||||
local SHA256SUM=""
|
||||
local VERSION_NUM=""
|
||||
local RELEASES=""
|
||||
|
||||
case ${RELEASE} in
|
||||
33|34|35_beta) VERSION=${RELEASE};;
|
||||
*)
|
||||
echo "ERROR! Fedora ${RELEASE} is not a supported release."
|
||||
releases_fedora
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
RELEASES=$(releases_fedora)
|
||||
if [[ "${RELEASES}" != *"${RELEASE}"* ]]; then
|
||||
echo "ERROR! Fedora ${RELEASE} is not a supported release."
|
||||
echo "${RELEASES}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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
|
||||
VERSION_NUM=${VERSION%"_beta"}
|
||||
FEDORA_RELEASE=$(echo ${FEDORA_VERSIONS} | jq -c '. | select(.version | contains("Beta"))' | jq '. | select(.variant=="Workstation")')
|
||||
if [[ "${RELEASE}" == *"beta"* ]]; then
|
||||
VERSION_NUM=${RELEASE%"_beta"}
|
||||
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"
|
||||
else
|
||||
FEDORA_RELEASE=$(echo ${FEDORA_VERSIONS} | jq '. | select(.variant=="Workstation" and .version=="'${VERSION}'")')
|
||||
ISO="Fedora-Workstation-Live-x86_64-${VERSION}-1.2.iso"
|
||||
FEDORA_RELEASE=$(echo "${FEDORA_VERSIONS}" | jq '. | select(.variant=="Workstation" and .version=="'${RELEASE}'")')
|
||||
ISO="Fedora-Workstation-Live-x86_64-${RELEASE}-1.2.iso"
|
||||
fi
|
||||
|
||||
URL=$(echo "${FEDORA_RELEASE}" | jq -r '.link')
|
||||
|
|
Loading…
Reference in a new issue