readd EasyOS

This commit is contained in:
zen0bit 2024-04-12 01:27:50 +02:00 committed by Martin Wimpress
parent 70cf5c2100
commit 10d69b72d0

View File

@ -79,6 +79,7 @@ function pretty_name() {
chimeralinux) PRETTY_NAME="Chimera Linux";;
crunchbang++) PRETTY_NAME="Crunchbang++";;
dragonflybsd) PRETTY_NAME="DragonFlyBSD";;
easyos) PRETTY_NAME="EasyOS";;
elementary) PRETTY_NAME="elementary OS";;
endeavouros) PRETTY_NAME="EndeavourOS";;
endless) PRETTY_NAME="Endless OS";;
@ -246,6 +247,7 @@ function os_support() {
deepin \
devuan \
dragonflybsd \
easyos \
edubuntu \
elementary \
endeavouros \
@ -347,6 +349,7 @@ function os_homepages(){
deepin) HOMEPAGE="https://www.deepin.org/";;
devuan) HOMEPAGE="https://www.devuan.org/";;
dragonflybsd) HOMEPAGE="https://www.dragonflybsd.org/";;
easyos) HOMEPAGE="https://easyos.org/";;
edubuntu) HOMEPAGE="https://www.edubuntu.org/";;
elementary) HOMEPAGE="https://elementary.io/";;
endeavouros) HOMEPAGE="https://endeavouros.com/";;
@ -593,6 +596,15 @@ function releases_dragonflybsd() {
echo $DBSD_RELEASES
}
function releases_easyos() {
#local RLIST
#RLIST=$(curl -s https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/2023/ | grep 'href="' | tail +2 | cut -d'/' -f1 | cut -d'"' -f6)
#RLIST=$(wget -q -O- 'https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/2023/' | grep 'href="' | tail +2 | cut -d'/' -f1 | cut -d'"' -f6)
#echo ${RLIST}
# Not dynamic for now
echo 5.7 5.6.7 5.6.6 5.6.5 5.6.4 5.6.3 5.6.2 5.6.1 5.5.5 5.5.4
}
function releases_elementary() {
echo 7.0 7.1
}
@ -1219,6 +1231,9 @@ function make_vm_config() {
dragonflybsd)
GUEST="dragonflybsd"
IMAGE_TYPE="iso";;
easyos)
GUEST="linux"
IMAGE_TYPE="img";;
freebsd|ghostbsd)
GUEST="freebsd"
IMAGE_TYPE="iso";;
@ -1747,6 +1762,25 @@ function get_dragonflybsd() {
echo "${URL}/${ISO} ${HASH}"
}
function get_easyos() {
local HASH=""
local URL=""
local ISO=""
local YEAR=""
ISO="easy-${RELEASE}-amd64.img"
case ${RELEASE} in
5.6.5|5.6.4|5.6.3|5.6.2|5.6.1|5.5.5|5.5.4)
YEAR="2023";;
5.7|5.6.7|5.6.6)
YEAR="2024";;
esac
URL="https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/${YEAR}/${RELEASE}"
HASH=$(wget -q -O- "${URL}/md5.sum.txt" | cut -d' ' -f1)
echo "${URL}/${ISO} ${HASH}"
}
function get_elementary() {
local HASH=""
case ${RELEASE} in
@ -3342,6 +3376,11 @@ create_vm() {
ISO="${ISO/.bz2/}"
fi
if [[ ${OS} == "easyos" ]] && [[ ${ISO} =~ ".img" ]]; then
qemu-img convert -f raw -O qcow2 "${VM_PATH}/${ISO}" "${VM_PATH}/disk.qcow2"
ISO="${ISO/.img/}"
fi
if [ ${OS} == "reactos" ] && [[ $ISO =~ ".zip" ]]; then
unzip ${VM_PATH}/${ISO} -d ${VM_PATH}
ISO=$(ls ${VM_PATH} | grep -i '.iso' | grep -v '.zip')