Compare commits

..

2 commits

Author SHA1 Message Date
252cb1b1de
steps/fixes
All checks were successful
/ job (push) Successful in 10m50s
2024-08-25 17:41:04 +02:00
8a4a5f081f
step into 2024-08-25 17:31:52 +02:00

View file

@ -728,28 +728,29 @@ spcd_install_git() {
# ╰───────┴────────╯ # ╰───────┴────────╯
spcd_install_python() { spcd_install_python() {
spcd_step "Install Python" spcd_step_in "Install Python"
spcd_install_package "${SPCD_PYTHON_PACKAGE}" spcd_install_package "${SPCD_PYTHON_PACKAGE}"
spcd_substep "Link alias to command" spcd_step "Link alias to command"
spcd_ln_python "${SPCD_PYTHON_COMMAND}" spcd_ln_python "${SPCD_PYTHON_COMMAND}"
# venv # venv
spcd_substep "Install virtual environment" spcd_step "Install virtual environment"
case "${SPCD_OS_ID}" in case "${SPCD_OS_ID}" in
"${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}") "${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}")
spcd_install_package "python3-venv" spcd_install_package "python3-venv"
;; ;;
*) ;; *) ;;
esac esac
spcd_substep "Configure PIP" spcd_step "Configure PIP"
spcd_write "/etc/pip.conf" "\ spcd_write "/etc/pip.conf" "\
[global] [global]
index-url = ${SPCD_URL_PYTHON} index-url = ${SPCD_URL_PYTHON}
" "
spcd_substep "Create virtual environment" spcd_step "Create virtual environment"
"${SPCD_PYTHON_ALIAS}" -m "venv" "${SPCD_PYTHON_VENV}" "${SPCD_PYTHON_ALIAS}" -m "venv" "${SPCD_PYTHON_VENV}"
spcd_substep "Activate virtual environment" spcd_step "Activate virtual environment"
export PATH="${SPCD_PYTHON_VENV_BINARIES}:${PATH}" export PATH="${SPCD_PYTHON_VENV_BINARIES}:${PATH}"
export VIRTUAL_ENV="${SPCD_PYTHON_VENV}" export VIRTUAL_ENV="${SPCD_PYTHON_VENV}"
spcd_step_out
} }
spcd_install_python_modules() { spcd_install_python_modules() {
@ -776,9 +777,9 @@ spcd_install_python_modules() {
} }
spcd_install_packages() { spcd_install_packages() {
spcd_step "Install packages" spcd_step_in "Install packages"
# epel # epel
spcd_substep "Install EPEL" spcd_step "Install EPEL"
case "${SPCD_OS_ID}" in case "${SPCD_OS_ID}" in
"${SPCD_OS_ALMA}" | "${SPCD_OS_ROCKY}") "${SPCD_OS_ALMA}" | "${SPCD_OS_ROCKY}")
spcd_install_package "epel-release" spcd_install_package "epel-release"
@ -792,13 +793,13 @@ spcd_install_packages() {
*) ;; *) ;;
esac esac
# bats # bats
spcd_substep "Install BATS" spcd_step "Install BATS"
spcd_install_package "bats" spcd_install_package "bats"
# graphviz # graphviz
spcd_substep "Install GraphViz" spcd_step "Install GraphViz"
spcd_install_package "graphviz" spcd_install_package "graphviz"
# openssh # openssh
spcd_substep "Install OpenSSH" spcd_step "Install OpenSSH"
case "${SPCD_PM}" in case "${SPCD_PM}" in
"${SPCD_PM_APK}" | "${SPCD_PM_APT}") "${SPCD_PM_APK}" | "${SPCD_PM_APT}")
spcd_install_package "openssh-client" spcd_install_package "openssh-client"
@ -810,13 +811,13 @@ spcd_install_packages() {
*) ;; *) ;;
esac esac
# plantuml # plantuml
spcd_substep "Install PlantUML" spcd_step "Install PlantUML"
spcd_install_package "plantuml" spcd_install_package "plantuml"
# rsync # rsync
spcd_substep "Install Rsync" spcd_step "Install Rsync"
spcd_install_package "rsync" spcd_install_package "rsync"
# shell check # shell check
spcd_substep "Install ShellCheck" spcd_step "Install ShellCheck"
case "${SPCD_PF}" in case "${SPCD_PF}" in
"${SPCD_PF_RPM}") "${SPCD_PF_RPM}")
spcd_install_package "ShellCheck" spcd_install_package "ShellCheck"
@ -824,7 +825,7 @@ spcd_install_packages() {
*) spcd_install_package "shellcheck" ;; *) spcd_install_package "shellcheck" ;;
esac esac
# shfmt # shfmt
spcd_substep "Install ShellFormat" spcd_step "Install ShellFormat"
case "${SPCD_OS_ID}" in case "${SPCD_OS_ID}" in
"${SPCD_OS_ALMA}" | "${SPCD_OS_ROCKY}") ;; "${SPCD_OS_ALMA}" | "${SPCD_OS_ROCKY}") ;;
"${SPCD_OS_DEBIAN}") "${SPCD_OS_DEBIAN}")
@ -835,6 +836,7 @@ spcd_install_packages() {
;; ;;
*) spcd_install_package "shfmt" ;; *) spcd_install_package "shfmt" ;;
esac esac
spcd_step_out
} }
spcd_write_python_module() { spcd_write_python_module() {
@ -881,6 +883,7 @@ spcd_step() {
} }
spcd_step_in() { spcd_step_in() {
[ -n "${1}" ] && spcd_step "${1}"
SPCD_STEP_LEVEL=$((SPCD_STEP_LEVEL + 1)) SPCD_STEP_LEVEL=$((SPCD_STEP_LEVEL + 1))
spcd_step_wipe spcd_step_wipe
} }
@ -1215,7 +1218,7 @@ spcd_banner_unset() {
# │ internal │ step │ # │ internal │ step │
# ╰──────────┴──────╯ # ╰──────────┴──────╯
SPCD_STEP=1 SPCD_STEP_LEVEL=1
spcd_step_wipe() { spcd_step_wipe() {
unset \ unset \