mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Refactor get_void()
This commit is contained in:
parent
bee4d52457
commit
71c7542dcb
1 changed files with 7 additions and 22 deletions
29
quickget
29
quickget
|
@ -1093,32 +1093,17 @@ function get_openbsd() {
|
||||||
function get_void() {
|
function get_void() {
|
||||||
local HASH=""
|
local HASH=""
|
||||||
local ISO=""
|
local ISO=""
|
||||||
local URL=""
|
local URL="https://alpha.de.repo.voidlinux.org/live/current"
|
||||||
local HASH_URL=""
|
|
||||||
|
|
||||||
validate_release "releases_void"
|
validate_release "releases_void"
|
||||||
DATE=$(wget -q -O- "https://alpha.de.repo.voidlinux.org/live/current/sha256sum.txt" | awk 'NR == 1' |cut -d'.' -f1| cut -d'-' -f4)
|
DATE=$(wget -q -O- "${URL}/sha256sum.txt" | head -n1 | cut -d'.' -f1 | cut -d'-' -f4)
|
||||||
URL="https://alpha.de.repo.voidlinux.org/live/current"
|
|
||||||
case ${RELEASE} in
|
case ${RELEASE} in
|
||||||
base)
|
base) ISO="void-live-x86_64-${DATE}.iso";;
|
||||||
ISO="void-live-x86_64-${DATE}.iso";;
|
musl) ISO="void-live-x86_64-musl-${DATE}.iso";;
|
||||||
musl)
|
xfce) ISO="void-live-x86_64-${DATE}-xfce.iso";;
|
||||||
ISO="void-live-x86_64-musl-${DATE}.iso";;
|
xfce-musl) ISO="void-live-x86_64-musl-${DATE}-xfce.iso";;
|
||||||
xfce)
|
|
||||||
ISO="void-live-x86_64-${DATE}-xfce.iso";;
|
|
||||||
xfce-musl)
|
|
||||||
ISO="void-live-x86_64-musl-${DATE}-xfce.iso";;
|
|
||||||
esac
|
|
||||||
case ${RELEASE} in
|
|
||||||
base)
|
|
||||||
HASH="$(wget -q -O- "https://alpha.de.repo.voidlinux.org/live/current/sha256sum.txt" | grep "void-live-x86_64-${DATE}.iso" | cut -d' ' -f4)";;
|
|
||||||
musl)
|
|
||||||
HASH="$(wget -q -O- "https://alpha.de.repo.voidlinux.org/live/current/sha256sum.txt" | grep "void-live-x86_64-musl-${DATE}.iso" | cut -d' ' -f4)";;
|
|
||||||
xfce)
|
|
||||||
HASH="$(wget -q -O- "https://alpha.de.repo.voidlinux.org/live/current/sha256sum.txt" | grep "void-live-x86_64-${DATE}-xfce.iso" | cut -d' ' -f4)";;
|
|
||||||
xfce-musl)
|
|
||||||
HASH="$(wget -q -O- "https://alpha.de.repo.voidlinux.org/live/current/sha256sum.txt" | grep "void-live-x86_64-musl-${DATE}.iso" | cut -d' ' -f4)";;
|
|
||||||
esac
|
esac
|
||||||
|
HASH="$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f4)"
|
||||||
web_get "${URL}/${ISO}" "${VM_PATH}"
|
web_get "${URL}/${ISO}" "${VM_PATH}"
|
||||||
check_hash "${ISO}" "${HASH}"
|
check_hash "${ISO}" "${HASH}"
|
||||||
make_vm_config "${ISO}"
|
make_vm_config "${ISO}"
|
||||||
|
|
Loading…
Reference in a new issue