Compare commits

..

5 commits

Author SHA1 Message Date
bcc64b6af3
fixes
Some checks failed
/ job (push) Failing after 6m14s
2024-08-21 14:47:29 +02:00
a01423f604
pf/rpm 2024-08-21 13:56:58 +02:00
83f4d7d3b7
shfmt 2024-08-21 13:55:17 +02:00
1093ec0c86
spcd_pf 2024-08-21 13:54:47 +02:00
3586b1af67
spcd_pf_ 2024-08-21 13:52:38 +02:00

43
spcd.sh
View file

@ -265,8 +265,25 @@ ${SPCD_PROJECT_ROOT}$(basename "${GITHUB_SERVER_URL}")"
;; ;;
*) ;; *) ;;
esac esac
# set package format
case "${SPCD_PM}" in
"${SPCD_PM_APK}")
SPCD_PF="${SPCD_PF_APK}"
;;
"${SPCD_PM_APT}")
SPCD_PF="${SPCD_PF_DEB}"
;;
"${SPCD_PM_PACMAN}")
SPCD_PF="${SPCD_PF_PKG}"
;;
"${SPCD_PM_DNF}" | "${SPCD_PM_ZYPPER}")
SPCD_PF="${SPCD_PF_RPM}"
;;
*) ;;
esac
# set package manager variables
spcd_split spcd_split
spcd_echo "SPCD_PM" spcd_echo "SPCD_PF" "SPCD_PM"
case "${SPCD_PM}" in case "${SPCD_PM}" in
"${SPCD_PM_DNF}") "${SPCD_PM_DNF}")
SPCD_PM_CLEAN="dnf clean all" SPCD_PM_CLEAN="dnf clean all"
@ -780,8 +797,8 @@ spcd_install_packages() {
spcd_install_package "rsync" spcd_install_package "rsync"
# shell check # shell check
spcd_substep "Install ShellCheck" spcd_substep "Install ShellCheck"
case "${SPCD_PM}" in case "${SPCD_PF}" in
"${SPCD_PM_DNF}" | "${SPCD_PM_ZYPPER}") "${SPCD_PF_RPM}")
spcd_install_package "ShellCheck" spcd_install_package "ShellCheck"
;; ;;
*) spcd_install_package "shellcheck" ;; *) spcd_install_package "shellcheck" ;;
@ -791,7 +808,10 @@ spcd_install_packages() {
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}")
[ "${SPCD_OS_VERSION}" != "bullseye" ] && spcd_install_package "shfmt" case "${SPCD_OS_VERSION}" in
"bullseye") ;;
*) spcd_install_package "shfmt" ;;
esac
;; ;;
*) spcd_install_package "shfmt" ;; *) spcd_install_package "shfmt" ;;
esac esac
@ -960,11 +980,11 @@ spcd_step() {
spcd_substep() { spcd_substep() {
SPCD_SUBSTEP=$((SPCD_SUBSTEP + 1)) SPCD_SUBSTEP=$((SPCD_SUBSTEP + 1))
spcd_banner \ spcd_banner \
"${SPCD_STEP}.${SPCD_SUBSTEP}" \ "${SPCD_STEP}.${SPCD_SUBSTEP}" \
"${SPCD_VERT}" \ "${SPCD_VERT}" \
"${SPCD_STEP_TEXT}" \ "${SPCD_STEP_TEXT}" \
"${SPCD_VERT}" \ "${SPCD_VERT}" \
"${*}" "${*}"
} }
spcd_write() { spcd_write() {
@ -998,6 +1018,11 @@ SPCD_OS_OPENSUSE="opensuse"
SPCD_OS_ROCKY="rocky" SPCD_OS_ROCKY="rocky"
SPCD_OS_UBUNTU="ubuntu" SPCD_OS_UBUNTU="ubuntu"
SPCD_PF_APK="apk"
SPCD_PF_DEB="deb"
SPCD_PF_PKG="pkg"
SPCD_PF_RPM="rpm"
SPCD_PM_APK="apk" SPCD_PM_APK="apk"
SPCD_PM_APT="apt" SPCD_PM_APT="apt"
SPCD_PM_DNF="dnf" SPCD_PM_DNF="dnf"