Compare commits

..

No commits in common. "cd1a7810a490aeea32a86eb2dcebf7bdb0ea9f9b" and "6a1fd882f2a70e19b65deea90d52cfbc5bf3990e" have entirely different histories.

2 changed files with 32 additions and 53 deletions

View file

@ -97,11 +97,8 @@ from various contexts of CA, CI and OCI / OS.
## Tasks ## Tasks
* try git repo url variable first for shunit
### sh ### sh
* implement substeps
* review repositories handling for systems * review repositories handling for systems
* opensuse * opensuse
* codecs repository * codecs repository
@ -135,7 +132,6 @@ from various contexts of CA, CI and OCI / OS.
* .sh * .sh
* maximum line length * maximum line length
* detect ssh private key type * detect ssh private key type
* implement substeps
* list sys.path * list sys.path
* set workflow templates * set workflow templates
* actions * actions

81
spcd.sh
View file

@ -739,9 +739,8 @@ ${spcd_ipm__target}"
} }
spcd_install_packages() { spcd_install_packages() {
spcd_step "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"
@ -755,13 +754,36 @@ 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 # plantuml
spcd_substep "Install OpenSSH" spcd_step "Install PlantUML"
spcd_install_package "plantuml"
# rsync
spcd_step "Install Rsync"
spcd_install_package "rsync"
# shell check
spcd_step "Install ShellCheck"
case "${SPCD_PM}" in
"${SPCD_PM_DNF}" | "${SPCD_PM_ZYPPER}")
spcd_install_package "ShellCheck"
;;
*) spcd_install_package "shellcheck" ;;
esac
# shfmt
spcd_step "Install ShellFormat"
case "${SPCD_OS_ID}" in
"${SPCD_OS_ALMA}" | "${SPCD_OS_ROCKY}") ;;
"${SPCD_OS_DEBIAN}")
[ "${SPCD_OS_VERSION}" != "bullseye" ] && spcd_install_package "shfmt"
;;
*) spcd_install_package "shfmt" ;;
esac
# ssh
spcd_step "Install SSH"
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"
@ -772,29 +794,6 @@ spcd_install_packages() {
"${SPCD_PM_PACMAN}") spcd_install_package "openssh" ;; "${SPCD_PM_PACMAN}") spcd_install_package "openssh" ;;
*) ;; *) ;;
esac esac
# plantuml
spcd_substep "Install PlantUML"
spcd_install_package "plantuml"
# rsync
spcd_substep "Install Rsync"
spcd_install_package "rsync"
# shell check
spcd_substep "Install ShellCheck"
case "${SPCD_PM}" in
"${SPCD_PM_DNF}" | "${SPCD_PM_ZYPPER}")
spcd_install_package "ShellCheck"
;;
*) spcd_install_package "shellcheck" ;;
esac
# shfmt
spcd_substep "Install ShellFormat"
case "${SPCD_OS_ID}" in
"${SPCD_OS_ALMA}" | "${SPCD_OS_ROCKY}") ;;
"${SPCD_OS_DEBIAN}")
[ "${SPCD_OS_VERSION}" != "bullseye" ] && spcd_install_package "shfmt"
;;
*) spcd_install_package "shfmt" ;;
esac
} }
spcd_write_python_module() { spcd_write_python_module() {
@ -828,13 +827,6 @@ ${SPCD_PYTHON_ALIAS} / ${spcd_stp__name}"
# functions # functions
spcd_banner() {
echo "\
${SPCD_DOWN}
${SPCD_VERT} ${*}
${SPCD___UP}"
}
spcd_cat() { spcd_cat() {
spcd_cat__file="${1}" spcd_cat__file="${1}"
if [ -n "${spcd_cat__file}" ]; then if [ -n "${spcd_cat__file}" ]; then
@ -952,19 +944,10 @@ spcd_split() {
spcd_step() { spcd_step() {
SPCD_STEP=$((SPCD_STEP + 1)) SPCD_STEP=$((SPCD_STEP + 1))
SPCD_STEP_TEXT="${*}" echo "\
unset SPCD_SUBSTEP ${SPCD_DOWN}
spcd_banner "${SPCD_STEP}" "${SPCD_VERT}" "${SPCD_STEP_TEXT}" ${SPCD_VERT} ${SPCD_STEP} ${*}
} ${SPCD___UP}"
spcd_substep() {
SPCD_SUBSTEP=$((SPCD_SUBSTEP + 1))
spcd_banner \
"${SPCD_STEP}.${SPCD_SUBSTEP}" \
"${SPCD_VERT}" \
"${SPCD_STEP_TEXT}" \
"${SPCD_VERT}" \
"${*}"
} }
spcd_write() { spcd_write() {