Refactor Garuda support to properly implement releases and editions

pull/380/head
Martin Wimpress 3 years ago
parent 6b54c58173
commit a939206288
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
  1. 45
      quickget

@ -284,20 +284,25 @@ function releases_freebsd(){
} }
function releases_garuda() { function releases_garuda() {
echo bspwm \ echo 220131 \
dr460nized \ 220220
}
function editions_garuda() {
echo dr460nized \
dr460nized-blackarch \ dr460nized-blackarch \
dr460nized-gaming \ dr460nized-gaming \
bspwm \
cinnamon \
gnome \ gnome \
i3 \ i3 \
kde-barebones \ kde-barebones \
lxqt-kwin \ lxqt-kwin \
mate \
qtile \ qtile \
sway \ sway \
wayfire \ wayfire \
xfce \ xfce
mate \
cinnamon
} }
function releases_gentoo(){ function releases_gentoo(){
@ -910,28 +915,24 @@ function get_freebsd() {
} }
function get_garuda() { function get_garuda() {
local DATE="" local BRANCH=""
local EDITION=""
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="http://mirrors.fossho.st/garuda/iso" local URL=""
local REL_TYPE=""
local LATEST_URL=""
local HASH_URL=""
case ${RELEASE} in if [ -n "${1}" ]; then
mate|cinnamon) EDITION="${1}"
REL_TYPE="community";; fi
*)
REL_TYPE="garuda";; case ${EDITION} in
cinnamon|mate) BRANCH="community";;
*) BRANCH="garuda";;
esac esac
# Follow daily releases and use SHA hash file to derive .iso and date URL="http://mirrors.fossho.st/garuda/iso/${BRANCH}/${EDITION}/${RELEASE}"
LATEST_URL="${URL}/latest/${REL_TYPE}/${RELEASE}/latest.iso.sha256" ISO="${OS}-${EDITION}-linux-zen-${RELEASE}.iso"
HASH_URL="$(wget -q -O- "${LATEST_URL}")" HASH="$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)"
ISO="$(echo "${HASH_URL}" | awk '{print $NF}')"
HASH=$(echo "${HASH_URL}" | cut -d' ' -f1)
DATE=$(echo "${ISO}" | awk -F'-' '{print $NF}' | cut -d'.' -f1)
URL="${URL}/${REL_TYPE}/${RELEASE}/${DATE}"
web_get "${URL}/${ISO}" "${VM_PATH}" web_get "${URL}/${ISO}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}" check_hash "${ISO}" "${HASH}"
make_vm_config "${OS}-${RELEASE}.iso" make_vm_config "${OS}-${RELEASE}.iso"

Loading…
Cancel
Save