DistroHopper/templates/freebsd

35 lines
958 B
Text

# Template file for 'freebsd'
OSNAME="freebsd"
PRETTY="FreeBSD"
LOGO=""
ICON="freebsd.svg"
CATEGORY="advanced"
BASEDOF="-"
HOMEPAGE="https://www.freebsd.org"
DESCRIPTION="Operating system used to power modern servers, desktops, and embedded platforms"
CREDENTIALS="-"
GPG=""
RSS=""
DW=""
GUEST="freebsd"
function releases_() {
# List available release directories (RELEASE and RC/BETA), newest first.
web_pipe "https://download.freebsd.org/ftp/releases/amd64/amd64/" \
| grep -Eo 'href="[0-9.]+-(RELEASE|RC[0-9]+)' \
| sed 's/href="//' \
| sort -rV | uniq
}
function editions_() {
echo disc1 dvd1
}
function get_() {
local HASH=""
local ISO="FreeBSD-${RELEASE}-amd64-${EDITION}.iso"
local VER="${RELEASE%%-*}"
local URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${VER}"
HASH=$(web_pipe "${URL}/CHECKSUM.SHA256-FreeBSD-${RELEASE}-amd64" | grep "${ISO}" | grep -v ".xz" | cut -d' ' -f4)
echo "${URL}/${ISO} ${HASH}"
}