This commit is contained in:
zenobit 2025-02-18 03:44:16 +01:00
parent 4571228b26
commit f20f132ea2
1 changed files with 33 additions and 26 deletions

View File

@ -4,7 +4,7 @@ PRETTY="DietPi"
BASEDOF="Debian"
DESCRIPTION="Highly optimised minimal Debian OS"
HOMEPAGE="https://dietpi.com"
CREDENTIALS="-"
CREDENTIALS='-'
function releases_() {
echo bios uefi
@ -18,32 +18,39 @@ function get_() {
local HASH=""
local ISO=""
local URL="https://dietpi.com/downloads/images"
case ${RELEASE} in
bios)
case ${EDITION} in
bookworm)
local ISO="DietPi_NativePC-BIOS-x86_64-Bookworm.7z";;
bullseye)
local ISO="DietPi_NativePC-BIOS-x86_64-Bullseye.7z";;
bookworm-installer)
local ISO="DietPi_NativePC-BIOS-x86_64-Bookworm_Installer.7z";;
bullseye-installer)
local ISO="DietPi_NativePC-BIOS-x86_64-Bullseye_Installer.7z";;
esac;;
uefi)
case ${EDITION} in
bookworm-installer)
local ISO="DietPi_NativePC-UEFI-x86_64-Bookworm_Installer.7z";;
bullseye-installer)
local ISO="DietPi_NativePC-UEFI-x86_64-Bullseye_Installer.7z";;
esac;;
esac
if [ "${RELEASE}" == 'bios' ]; then
case ${EDITION} in
bookworm )
local ISO="DietPi_NativePC-BIOS-x86_64-Bookworm.7z";;
bullseye )
local ISO="DietPi_NativePC-BIOS-x86_64-Bullseye.7z";;
'bookworm-installer' )
local ISO="DietPi_NativePC-BIOS-x86_64-Bookworm_Installer.7z";;
'bullseye-installer' )
local ISO="DietPi_NativePC-BIOS-x86_64-Bullseye_Installer.7z";;
esac
elif [ "${RELEASE}" == 'uefi' ]; then
case ${EDITION} in
'bookworm-installer' )
local ISO="DietPi_NativePC-UEFI-x86_64-Bookworm_Installer.7z";;
'bullseye-installer' )
local ISO="DietPi_NativePC-UEFI-x86_64-Bullseye_Installer.7z";;
esac
fi
HASH=$(wget -q -O- "${URL}/SHASUMS.txt" | grep "${ISO}" | cut -d' ' -f1)
echo "${URL}/${ISO} ${HASH}"
}
#dietpi)
# if [[ $ISO =~ ".7z" ]]; then
# 7zip x -o${VM_PATH} ${VM_PATH}/${ISO}
# ISO=$(ls ${VM_PATH} | grep -i '.iso')
# fi;;
function distro_specific() {
if [[ "${ISO}" =~ ".7z" ]]; then
7zip x -o${VM_PATH} ${VM_PATH}/${ISO}
ISO=$(ls ${VM_PATH} | grep -i '.iso')
fi
}
function specific_tweaks() {
if [[ "${RELEASE}" == 'bios' ]]; then
echo "boot=\"legacy\"" >> "${CONF_FILE}"
fi
}