From 3362d2edeaac15293e533249587cba3a9892bf2a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 28 Aug 2024 20:00:28 +0200 Subject: [PATCH] defaults --- spcd/bootstrap.sh | 104 +++++++++++++++++++++++----------------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 7a61137..63b04c4 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -330,6 +330,57 @@ SPCD_PM_ZYPPER="zypper" # │ 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 "Set variables" # check script first @@ -605,57 +656,6 @@ ${SPCD_PYTHON_VENV}/lib/${SPCD_PYTHON_COMMAND}/site-packages" 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 "List workspace" spcd_lwd__path="$(realpath .)" @@ -1264,8 +1264,8 @@ ${SPCD_PYTHON_ALIAS} / ${spcd_stp__name}" spcd_main() { # environment spcd_step_in "Environment" - spcd_step__environment_set_variables spcd_step__environment_defaults + spcd_step__environment_set_variables spcd_step__environment_list_workspace spcd_step_out # dns