Move config to..

This commit is contained in:
zenobit 2025-02-18 03:25:39 +01:00
parent db7c168b8e
commit 9b1f64609e
2 changed files with 13 additions and 10 deletions

View File

@ -5,6 +5,8 @@ BASEDOF="-"
HOMEPAGE="https://batocera.org"
DESCRIPTION="Retro-gaming distribution with the aim of turning any computer/nano computer into a gaming console during a game or permanently"
CREDENTIALS="-"
GUEST="batocera"
IMAGE_TYPE="img"
function releases_() {
#shellcheck disable=SC2046,SC2005
@ -18,3 +20,14 @@ function get_() {
ISO="$(web_pipe "${URL}/" | grep -e 'batocera.*img.gz'| cut -d'"' -f2)"
echo "${URL}/${ISO} ${HASH}"
}
function distro_specific() {
if [[ ${ISO} = *".gz"* ]]; then
gzip -d "${VM_PATH}/${ISO}"
ISO="${ISO/.gz/}"
fi
}
function specific_tweaks() {
echo "disk_size=\"8G\"" >> "${CONF_FILE}"
}

View File

@ -570,9 +570,6 @@ function make_vm_config() {
IMAGE_FILE="${1}"
ISO_FILE="${2}"
case "${OS}" in
batocera)
GUEST="batocera"
IMAGE_TYPE="img";;
custom)
GUEST="${CUSTOM_OS}"
IMAGE_TYPE="${CUSTOM_IMAGE_TYPE}";;
@ -656,8 +653,6 @@ EOF
openindiana)
echo "boot=\"legacy\"" >> "${CONF_FILE}"
echo "disk_size=\"32G\"" >> "${CONF_FILE}";;
batocera)
echo "disk_size=\"8G\"" >> "${CONF_FILE}";;
bazzite)
echo "disk_size=\"64G\"" >> "${CONF_FILE}";;
dragonflybsd|haiku|openbsd|netbsd|slackware|slax|tails|tinycore)
@ -785,11 +780,6 @@ function create_vm() {
# shellcheck disable=SC2076
case "${OS}" in
batocera)
if [[ ${ISO} = *".gz"* ]]; then
gzip -d "${VM_PATH}/${ISO}"
ISO="${ISO/.gz/}"
fi;;
dragonflybsd)
# Could be other OS iso files compressed with bzip2 or gzip
# but for now we'll keep this to know cases