mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Initial Fedora Support
This commit is contained in:
parent
840294c16b
commit
ca2a07461a
1 changed files with 57 additions and 1 deletions
56
quickget
56
quickget
|
@ -2,6 +2,7 @@
|
|||
|
||||
function os_support() {
|
||||
echo freebsd \
|
||||
fedora \
|
||||
kubuntu \
|
||||
lubuntu \
|
||||
macos \
|
||||
|
@ -19,6 +20,12 @@ function releases_freebsd(){
|
|||
13_0
|
||||
}
|
||||
|
||||
function releases_fedora(){
|
||||
echo 33 \
|
||||
34 \
|
||||
35_beta
|
||||
}
|
||||
|
||||
function releases_macos() {
|
||||
echo high-sierra \
|
||||
mojave \
|
||||
|
@ -285,6 +292,9 @@ function make_vm_config() {
|
|||
if [[ "${OS}" == "freebsd" ]]; then
|
||||
GUEST="freebsd"
|
||||
IMAGE_TYPE="iso"
|
||||
elif [[ "${OS}" == *"fedora"* ]]; then
|
||||
GUEST="linux"
|
||||
IMAGE_TYPE="iso"
|
||||
elif [[ "${OS}" == *"ubuntu"* ]]; then
|
||||
GUEST="linux"
|
||||
IMAGE_TYPE="iso"
|
||||
|
@ -349,6 +359,50 @@ function get_freebsd() {
|
|||
start_vm_info
|
||||
}
|
||||
|
||||
function get_fedora() {
|
||||
# For future releases, use dvd1 iso files.
|
||||
local URL=""
|
||||
local VERSION=""
|
||||
|
||||
case ${RELEASE} in
|
||||
33|34|35_beta) VERSION=${RELEASE};;
|
||||
*)
|
||||
echo "ERROR! Fedora ${RELEASE} is not a supported release."
|
||||
releases_fedora
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
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")')
|
||||
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"
|
||||
fi
|
||||
|
||||
URL=$(echo ${FEDORA_RELEASE} | jq -r '.link')
|
||||
SHA256SUM=$(echo ${FEDORA_RELEASE} | jq -r '.sha256')
|
||||
|
||||
web_get ${URL} ${VM_PATH}
|
||||
|
||||
echo "Checking SHA256SUMS..."
|
||||
cd "${VM_PATH}"
|
||||
if ! echo "${SHA256SUM} ${ISO}" | sha256sum --check --status; then
|
||||
echo "ERROR! ${ISO} doesn't match ${SHA256SUM}. Try running 'quickget' again."
|
||||
exit 1
|
||||
else
|
||||
echo "All good."
|
||||
fi
|
||||
cd ..
|
||||
|
||||
make_vm_dir
|
||||
make_vm_config ${ISO}
|
||||
start_vm_info
|
||||
}
|
||||
|
||||
function get_macos() {
|
||||
local CWD=""
|
||||
local MACRECOVERY=""
|
||||
|
@ -591,6 +645,8 @@ if [ "${OS}" == "macos" ]; then
|
|||
get_macos
|
||||
elif [[ "${OS}" == *"freebsd" ]]; then
|
||||
get_freebsd
|
||||
elif [[ "${OS}" == *"fedora"* ]]; then
|
||||
get_fedora
|
||||
elif [[ "${OS}" == *"ubuntu"* ]]; then
|
||||
get_ubuntu
|
||||
elif [ "${OS}" == "windows" ]; then
|
||||
|
|
Loading…
Reference in a new issue