Refactor get_kali() to add create_vm() compatibility

This commit is contained in:
Martin Wimpress 2022-02-23 10:39:45 +00:00
parent 723a185346
commit 11aa53d64d
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3

View File

@ -857,20 +857,11 @@ function get_haiku() {
function get_kali() {
local HASH=""
local ISO=""
local URL=""
local SUBDIR=""
local URL="https://cdimage.kali.org/${RELEASE}"
case ${RELEASE} in
latest) SUBDIR="current";;
*) SUBDIR="kali-weekly";;
esac
URL="https://cdimage.kali.org/${SUBDIR}"
ISO=$(wget -q -O- "${URL}/?C=M;O=D" | grep -o ">kali-linux-.*-installer-amd64.iso" | head -n 1 | cut -c 2-)
HASH=$(wget -q -O- "${URL}/SHA256SUMS" | grep -v torrent | grep "${ISO}" | cut -d' ' -f1)
web_get "${URL}/${ISO}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
echo "${URL}/${ISO} ${HASH}"
}
function get_kdeneon() {