This commit is contained in:
Marc Beninca 2024-09-09 02:37:48 +02:00
parent f8490994d9
commit 24f19e46ef
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -376,37 +376,6 @@ SPCD_PM_ZYPPER="zypper"
# │ e │ functions │
# ╰───┴───────────╯
spcd_step__environment_print() {
spcd_f_ca "list"
spcd_f_dns "list"
set -- \
"GIT_RWX" \
"GIT_SPCD" \
"GIT_SHUNIT" \
"REF_FEATURE" \
"REF_RELEASE" \
"REF_STAGING" \
"TXT_LOCALE" \
"URL_ALMA" \
"URL_ALPINE" \
"URL_ARCH" \
"URL_DEBIAN" \
"URL_EPEL" \
"URL_FEDORA" \
"URL_OPENSUSE" \
"URL_PYTHON" \
"URL_ROCKY" \
"URL_UBUNTU"
local item name value
for item in "${@}"; do
name="SPCD_${item}"
eval "value=\"\${${name}}\""
if [ -n "${value}" ]; then
spcd_os_printenv "${name}"
fi
done
}
spcd_step__environment_defaults_set() {
spcd_step "$(spcd_txt_get "set")"
@ -925,6 +894,37 @@ spcd_f_ca_update() {
# │ f │ env = environment │
# ╰───┴───────────────────╯
spcd_f_env_list() {
spcd_f_ca "list"
spcd_f_dns "list"
set -- \
"GIT_RWX" \
"GIT_SPCD" \
"GIT_SHUNIT" \
"REF_FEATURE" \
"REF_RELEASE" \
"REF_STAGING" \
"TXT_LOCALE" \
"URL_ALMA" \
"URL_ALPINE" \
"URL_ARCH" \
"URL_DEBIAN" \
"URL_EPEL" \
"URL_FEDORA" \
"URL_OPENSUSE" \
"URL_PYTHON" \
"URL_ROCKY" \
"URL_UBUNTU"
local item name value
for item in "${@}"; do
name="SPCD_${item}"
eval "value=\"\${${name}}\""
if [ -n "${value}" ]; then
spcd_os_printenv "${name}"
fi
done
}
spcd_f_env_workspace() {
spcd_os_ls "$(realpath .)"
}
@ -1561,10 +1561,10 @@ spcd_main() {
spcd_step_in "Environment"
spcd_step_in "Defaults"
spcd_step "Print defined"
spcd_step__environment_print
spcd_f_env_list
spcd_step__environment_defaults_set
spcd_step "Print effective"
spcd_step__environment_print
spcd_f_env_list
spcd_step_out
spcd_step__environment_set_variables
spcd_step "List workspace"