Compare commits
7 commits
6a1fd882f2
...
cd1a7810a4
Author | SHA1 | Date | |
---|---|---|---|
cd1a7810a4 | |||
580b0f1d48 | |||
01cfa3db65 | |||
8ab46c1d59 | |||
96a35fdc8e | |||
3660bd23a2 | |||
00f6653d28 |
2 changed files with 53 additions and 32 deletions
|
@ -97,8 +97,11 @@ from various contexts of CA, CI and OCI / OS.
|
|||
|
||||
## Tasks
|
||||
|
||||
* try git repo url variable first for shunit
|
||||
|
||||
### sh
|
||||
|
||||
* implement substeps
|
||||
* review repositories handling for systems
|
||||
* opensuse
|
||||
* codecs repository
|
||||
|
@ -132,6 +135,7 @@ from various contexts of CA, CI and OCI / OS.
|
|||
* .sh
|
||||
* maximum line length
|
||||
* detect ssh private key type
|
||||
* implement substeps
|
||||
* list sys.path
|
||||
* set workflow templates
|
||||
* actions
|
||||
|
|
81
spcd.sh
81
spcd.sh
|
@ -739,8 +739,9 @@ ${spcd_ipm__target}"
|
|||
}
|
||||
|
||||
spcd_install_packages() {
|
||||
spcd_step "Install packages"
|
||||
# epel
|
||||
spcd_step "Install EPEL"
|
||||
spcd_substep "Install EPEL"
|
||||
case "${SPCD_OS_ID}" in
|
||||
"${SPCD_OS_ALMA}" | "${SPCD_OS_ROCKY}")
|
||||
spcd_install_package "epel-release"
|
||||
|
@ -754,36 +755,13 @@ spcd_install_packages() {
|
|||
*) ;;
|
||||
esac
|
||||
# bats
|
||||
spcd_step "Install BATS"
|
||||
spcd_substep "Install BATS"
|
||||
spcd_install_package "bats"
|
||||
# graphviz
|
||||
spcd_step "Install GraphViz"
|
||||
spcd_substep "Install GraphViz"
|
||||
spcd_install_package "graphviz"
|
||||
# plantuml
|
||||
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"
|
||||
# openssh
|
||||
spcd_substep "Install OpenSSH"
|
||||
case "${SPCD_PM}" in
|
||||
"${SPCD_PM_APK}" | "${SPCD_PM_APT}")
|
||||
spcd_install_package "openssh-client"
|
||||
|
@ -794,6 +772,29 @@ spcd_install_packages() {
|
|||
"${SPCD_PM_PACMAN}") spcd_install_package "openssh" ;;
|
||||
*) ;;
|
||||
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() {
|
||||
|
@ -827,6 +828,13 @@ ${SPCD_PYTHON_ALIAS} / ${spcd_stp__name}"
|
|||
|
||||
# functions
|
||||
|
||||
spcd_banner() {
|
||||
echo "\
|
||||
${SPCD_DOWN}
|
||||
${SPCD_VERT} ${*}
|
||||
${SPCD___UP}"
|
||||
}
|
||||
|
||||
spcd_cat() {
|
||||
spcd_cat__file="${1}"
|
||||
if [ -n "${spcd_cat__file}" ]; then
|
||||
|
@ -944,10 +952,19 @@ spcd_split() {
|
|||
|
||||
spcd_step() {
|
||||
SPCD_STEP=$((SPCD_STEP + 1))
|
||||
echo "\
|
||||
${SPCD_DOWN}
|
||||
${SPCD_VERT} ${SPCD_STEP} ${*}
|
||||
${SPCD___UP}"
|
||||
SPCD_STEP_TEXT="${*}"
|
||||
unset SPCD_SUBSTEP
|
||||
spcd_banner "${SPCD_STEP}" "${SPCD_VERT}" "${SPCD_STEP_TEXT}"
|
||||
}
|
||||
|
||||
spcd_substep() {
|
||||
SPCD_SUBSTEP=$((SPCD_SUBSTEP + 1))
|
||||
spcd_banner \
|
||||
"${SPCD_STEP}.${SPCD_SUBSTEP}" \
|
||||
"${SPCD_VERT}" \
|
||||
"${SPCD_STEP_TEXT}" \
|
||||
"${SPCD_VERT}" \
|
||||
"${*}"
|
||||
}
|
||||
|
||||
spcd_write() {
|
||||
|
|
Loading…
Reference in a new issue