mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2026-06-14 09:32:21 +00:00
46 lines
1.4 KiB
Text
46 lines
1.4 KiB
Text
# Template file for 'alpine'
|
|
OSNAME=alpine
|
|
PRETTY="Alpine Linux"
|
|
LOGO=" "
|
|
ICON="alpine.svg"
|
|
ICON_ONLINE="https://distrowatch.com/images/yvzhuwbpy/alpine.png"
|
|
CATEGORY="Lightweight"
|
|
BASEDOF="-"
|
|
DESCRIPTION="Security-oriented, lightweight Linux distribution based on musl libc and busybox"
|
|
HOMEPAGE="https://alpinelinux.org/"
|
|
CREDENTIALS="root:(no password)"
|
|
GPG=""
|
|
RSS=""
|
|
DW=""
|
|
|
|
function releases_() {
|
|
local REL=""
|
|
local RELS=""
|
|
RELS=$(web_pipe "https://dl-cdn.alpinelinux.org/alpine/" | grep '"v' | cut -d'"' -f2 | tr -d / | sort -Vr | head -n 10)
|
|
for REL in ${RELS}; do
|
|
if web_check "https://dl-cdn.alpinelinux.org/alpine/${REL}/releases/x86_64/"; then
|
|
echo -n "${REL} "
|
|
fi
|
|
done
|
|
}
|
|
|
|
function arch_() {
|
|
echo arm64 armhf armv7 loongarch64 ppc64el riscv64 s390x x86 amd64
|
|
}
|
|
|
|
function get_() {
|
|
local HASH=""
|
|
local ISO=""
|
|
local QEMU_ARCH
|
|
QEMU_ARCH=$(_qarch_to_upstream "${ARCH:-amd64}")
|
|
local URL="https://dl-cdn.alpinelinux.org/alpine/${RELEASE}/releases/${QEMU_ARCH}"
|
|
local VERSION=""
|
|
VERSION=$(web_pipe "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | head -1 | awk '{print $2}')
|
|
ISO="alpine-virt-${VERSION}-${QEMU_ARCH}.iso"
|
|
HASH=$(web_pipe "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | head -1 | awk '{print $2}')
|
|
echo "${URL}/${ISO} ${HASH}"
|
|
}
|
|
|
|
function config_() {
|
|
echo "disk_size=\"32G\"" >> "${CONF_FILE}"
|
|
}
|