This commit is contained in:
Marc Beninca 2024-08-27 19:51:11 +02:00
parent 0d457da964
commit 22823e7edf
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -1,43 +1,5 @@
#! /usr/bin/env sh #! /usr/bin/env sh
# ╭──────────╮
# │ defaults │
# ╰──────────╯
[ -n "${SPCD_CMD_SUM}" ] || SPCD_CMD_SUM="sha512sum"
[ -n "${SPCD_DNS_1}" ] || SPCD_DNS_1="9.9.9.9"
[ -n "${SPCD_GIT_MAIN}" ] || SPCD_GIT_MAIN="spcd"
[ -n "${SPCD_GIT_ROOT}" ] || SPCD_GIT_ROOT="rwx"
[ -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}" ] ||
SPCD_URL_ALMA="https://repo.almalinux.org"
[ -n "${SPCD_URL_ALPINE}" ] ||
SPCD_URL_ALPINE="https://dl-cdn.alpinelinux.org/alpine"
[ -n "${SPCD_URL_ARCH}" ] ||
SPCD_URL_ARCH="https://geo.mirror.pkgbuild.com/\$repo/os/\$arch"
[ -n "${SPCD_URL_DEBIAN}" ] ||
SPCD_URL_DEBIAN="https://deb.debian.org/debian"
[ -n "${SPCD_URL_EPEL}" ] ||
SPCD_URL_EPEL="https://dl.fedoraproject.org"
[ -n "${SPCD_URL_FEDORA}" ] ||
SPCD_URL_FEDORA="https://rpmfind.net/linux/fedora/linux"
[ -n "${SPCD_URL_OPENSUSE}" ] ||
SPCD_URL_OPENSUSE="https://download.opensuse.org"
[ -n "${SPCD_URL_PYTHON}" ] ||
SPCD_URL_PYTHON="https://pypi.org/simple"
[ -n "${SPCD_URL_ROCKY}" ] ||
SPCD_URL_ROCKY="https://dl.rockylinux.org"
[ -n "${SPCD_URL_UBUNTU}" ] ||
SPCD_URL_UBUNTU="https://ubuntu.mirrors.ovh.net/ubuntu"
# ╭───╮ # ╭───╮
# │ _ │ # │ _ │
# ╰───╯ # ╰───╯
@ -643,6 +605,42 @@ ${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_MAIN}" ] || SPCD_GIT_MAIN="spcd"
[ -n "${SPCD_GIT_ROOT}" ] || SPCD_GIT_ROOT="rwx"
[ -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}" ] ||
SPCD_URL_ALMA="https://repo.almalinux.org"
[ -n "${SPCD_URL_ALPINE}" ] ||
SPCD_URL_ALPINE="https://dl-cdn.alpinelinux.org/alpine"
[ -n "${SPCD_URL_ARCH}" ] ||
SPCD_URL_ARCH="https://geo.mirror.pkgbuild.com/\$repo/os/\$arch"
[ -n "${SPCD_URL_DEBIAN}" ] ||
SPCD_URL_DEBIAN="https://deb.debian.org/debian"
[ -n "${SPCD_URL_EPEL}" ] ||
SPCD_URL_EPEL="https://dl.fedoraproject.org"
[ -n "${SPCD_URL_FEDORA}" ] ||
SPCD_URL_FEDORA="https://rpmfind.net/linux/fedora/linux"
[ -n "${SPCD_URL_OPENSUSE}" ] ||
SPCD_URL_OPENSUSE="https://download.opensuse.org"
[ -n "${SPCD_URL_PYTHON}" ] ||
SPCD_URL_PYTHON="https://pypi.org/simple"
[ -n "${SPCD_URL_ROCKY}" ] ||
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 .)"
@ -1221,6 +1219,7 @@ spcd_main() {
# environment # environment
spcd_step_in "Environment" spcd_step_in "Environment"
spcd_step__environment_set_variables spcd_step__environment_set_variables
spcd_step__environment_defaults
spcd_step__environment_list_workspace spcd_step__environment_list_workspace
spcd_step_out spcd_step_out
# dns # dns