This commit is contained in:
Marc Beninca 2024-08-28 20:00:28 +02:00
parent 464f07cd1e
commit 3362d2edea
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -330,6 +330,57 @@ SPCD_PM_ZYPPER="zypper"
# │ step │ environment │ # │ step │ environment │
# ╰──────┴─────────────╯ # ╰──────┴─────────────╯
spcd_step__environment_defaults() {
[ -n "${SPCD_CMD_SUM}" ] || SPCD_CMD_SUM="sha512sum"
[ -n "${SPCD_DNS_1}" ] || SPCD_DNS_1="9.9.9.9"
[ -n "${SPCD_GIT_RWX}" ] || SPCD_GIT_RWX="rwx"
[ -n "${SPCD_GIT_SPCD}" ] || SPCD_GIT_SPCD="spcd"
[ -n "${SPCD_GIT_SHUNIT}" ] || SPCD_GIT_SHUNIT="shunit2"
[ -n "${SPCD_REF_FEATURE}" ] || SPCD_REF_FEATURE="f"
[ -n "${SPCD_REF_RELEASE}" ] || SPCD_REF_RELEASE="main"
[ -n "${SPCD_REF_STAGING}" ] || SPCD_REF_STAGING="dev"
[ -n "${SPCD_URL_ALMA}" ] ||
# /almalinux/$releasever/…
# /vault/$releasever/…
SPCD_URL_ALMA="https://repo.almalinux.org"
[ -n "${SPCD_URL_ALPINE}" ] ||
# /v?.??/community
# /v?.??/main
SPCD_URL_ALPINE="https://dl-cdn.alpinelinux.org/alpine"
[ -n "${SPCD_URL_ARCH}" ] ||
# /$repo/os/$arch
SPCD_URL_ARCH="https://geo.mirror.pkgbuild.com"
[ -n "${SPCD_URL_DEBIAN}" ] ||
SPCD_URL_DEBIAN="https://deb.debian.org/debian"
[ -n "${SPCD_URL_EPEL}" ] ||
# /$releasever/Everything/…
# /testing/$releasever/Everything/…
SPCD_URL_EPEL="https://dl.fedoraproject.org/pub/epel"
[ -n "${SPCD_URL_FEDORA}" ] ||
# /releases/$releasever/Everything/…
# /updates/$releasever/Everything/…
# /updates/testing/$releasever/Everything/…
SPCD_URL_FEDORA="https://rpmfind.net/linux/fedora/linux"
[ -n "${SPCD_URL_OPENSUSE}" ] ||
# /debug/…
# /distribution/…
# /source/…
# /update/…
SPCD_URL_OPENSUSE="https://download.opensuse.org"
[ -n "${SPCD_URL_PYTHON}" ] ||
SPCD_URL_PYTHON="https://pypi.org/simple"
[ -n "${SPCD_URL_ROCKY}" ] ||
# /$contentdir/$releasever/…
SPCD_URL_ROCKY="https://dl.rockylinux.org"
[ -n "${SPCD_URL_UBUNTU}" ] ||
SPCD_URL_UBUNTU="https://ubuntu.mirrors.ovh.net/ubuntu"
}
spcd_step__environment_set_variables() { spcd_step__environment_set_variables() {
spcd_step "Set variables" spcd_step "Set variables"
# check script first # check script first
@ -605,57 +656,6 @@ ${SPCD_PYTHON_VENV}/lib/${SPCD_PYTHON_COMMAND}/site-packages"
spcd_os_printenv "SPCD_DL" spcd_os_printenv "SPCD_DL"
} }
spcd_step__environment_defaults() {
[ -n "${SPCD_CMD_SUM}" ] || SPCD_CMD_SUM="sha512sum"
[ -n "${SPCD_DNS_1}" ] || SPCD_DNS_1="9.9.9.9"
[ -n "${SPCD_GIT_RWX}" ] || SPCD_GIT_RWX="rwx"
[ -n "${SPCD_GIT_SPCD}" ] || SPCD_GIT_SPCD="spcd"
[ -n "${SPCD_GIT_SHUNIT}" ] || SPCD_GIT_SHUNIT="shunit2"
[ -n "${SPCD_REF_FEATURE}" ] || SPCD_REF_FEATURE="f"
[ -n "${SPCD_REF_RELEASE}" ] || SPCD_REF_RELEASE="main"
[ -n "${SPCD_REF_STAGING}" ] || SPCD_REF_STAGING="dev"
[ -n "${SPCD_URL_ALMA}" ] ||
# /almalinux/$releasever/…
# /vault/$releasever/…
SPCD_URL_ALMA="https://repo.almalinux.org"
[ -n "${SPCD_URL_ALPINE}" ] ||
# /v?.??/community
# /v?.??/main
SPCD_URL_ALPINE="https://dl-cdn.alpinelinux.org/alpine"
[ -n "${SPCD_URL_ARCH}" ] ||
# /$repo/os/$arch
SPCD_URL_ARCH="https://geo.mirror.pkgbuild.com"
[ -n "${SPCD_URL_DEBIAN}" ] ||
SPCD_URL_DEBIAN="https://deb.debian.org/debian"
[ -n "${SPCD_URL_EPEL}" ] ||
# /$releasever/Everything/…
# /testing/$releasever/Everything/…
SPCD_URL_EPEL="https://dl.fedoraproject.org/pub/epel"
[ -n "${SPCD_URL_FEDORA}" ] ||
# /releases/$releasever/Everything/…
# /updates/$releasever/Everything/…
# /updates/testing/$releasever/Everything/…
SPCD_URL_FEDORA="https://rpmfind.net/linux/fedora/linux"
[ -n "${SPCD_URL_OPENSUSE}" ] ||
# /debug/…
# /distribution/…
# /source/…
# /update/…
SPCD_URL_OPENSUSE="https://download.opensuse.org"
[ -n "${SPCD_URL_PYTHON}" ] ||
SPCD_URL_PYTHON="https://pypi.org/simple"
[ -n "${SPCD_URL_ROCKY}" ] ||
# /$contentdir/$releasever/…
SPCD_URL_ROCKY="https://dl.rockylinux.org"
[ -n "${SPCD_URL_UBUNTU}" ] ||
SPCD_URL_UBUNTU="https://ubuntu.mirrors.ovh.net/ubuntu"
}
spcd_step__environment_list_workspace() { spcd_step__environment_list_workspace() {
spcd_step "List workspace" spcd_step "List workspace"
spcd_lwd__path="$(realpath .)" spcd_lwd__path="$(realpath .)"
@ -1264,8 +1264,8 @@ ${SPCD_PYTHON_ALIAS} / ${spcd_stp__name}"
spcd_main() { spcd_main() {
# environment # environment
spcd_step_in "Environment" spcd_step_in "Environment"
spcd_step__environment_set_variables
spcd_step__environment_defaults spcd_step__environment_defaults
spcd_step__environment_set_variables
spcd_step__environment_list_workspace spcd_step__environment_list_workspace
spcd_step_out spcd_step_out
# dns # dns