quickemu/actions/pureos

34 lines
1.1 KiB
Plaintext

# Template file for 'pureos'
OSNAME="pureos"
PRETTY="PureOS"
BASEDOF="Debian"
HOMEPAGE="https://www.pureos.net"
DESCRIPTION="Fully free/libre and open source GNU/Linux operating system, endorsed by the Free Software Foundation"
CREDENTIALS="-"
function releases_() {
web_pipe "https://www.pureos.net/download/" | grep -m 1 "downloads.puri" | cut -d '"' -f 2 | cut -d '-' -f 4
}
function editions_() {
echo gnome plasma
}
function get_() {
local HASH=""
local ISO=""
local URL=""
local PureName=
PureName="$(web_pipe "https://www.pureos.net/download/" | grep -m 1 "downloads.puri" | cut -d '/' -f 4)"
local PureDate=
PureDate="$(web_pipe "https://www.pureos.net/download/" | grep -m 1 "downloads.puri" | cut -d '/' -f 6)"
local PureDateSquashed="${PureDate//'-'/}"
edition="${EDITION,,}"
URL="https://downloads.puri.sm/${PureName}/${edition}/${PureDate}"
ISO="pureos-${RELEASE}-${edition}-live-${PureDateSquashed}_amd64.iso"
local IsoTrimmed=
IsoTrimmed="${ISO%.*}"
HASH="$(web_pipe "${URL}/${IsoTrimmed}.checksums_sha256.txt" | grep -m 1 '.iso' | cut -d '.' -f 1)"
echo "${URL}/${ISO} ${HASH}"
}