Compare commits
5 commits
37e6767612
...
bcc64b6af3
Author | SHA1 | Date | |
---|---|---|---|
bcc64b6af3 | |||
a01423f604 | |||
83f4d7d3b7 | |||
1093ec0c86 | |||
3586b1af67 |
1 changed files with 34 additions and 9 deletions
33
spcd.sh
33
spcd.sh
|
@ -265,8 +265,25 @@ ${SPCD_PROJECT_ROOT}$(basename "${GITHUB_SERVER_URL}")"
|
|||
;;
|
||||
*) ;;
|
||||
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_echo "SPCD_PM"
|
||||
spcd_echo "SPCD_PF" "SPCD_PM"
|
||||
case "${SPCD_PM}" in
|
||||
"${SPCD_PM_DNF}")
|
||||
SPCD_PM_CLEAN="dnf clean all"
|
||||
|
@ -780,8 +797,8 @@ spcd_install_packages() {
|
|||
spcd_install_package "rsync"
|
||||
# shell check
|
||||
spcd_substep "Install ShellCheck"
|
||||
case "${SPCD_PM}" in
|
||||
"${SPCD_PM_DNF}" | "${SPCD_PM_ZYPPER}")
|
||||
case "${SPCD_PF}" in
|
||||
"${SPCD_PF_RPM}")
|
||||
spcd_install_package "ShellCheck"
|
||||
;;
|
||||
*) spcd_install_package "shellcheck" ;;
|
||||
|
@ -791,7 +808,10 @@ spcd_install_packages() {
|
|||
case "${SPCD_OS_ID}" in
|
||||
"${SPCD_OS_ALMA}" | "${SPCD_OS_ROCKY}") ;;
|
||||
"${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" ;;
|
||||
esac
|
||||
|
@ -998,6 +1018,11 @@ SPCD_OS_OPENSUSE="opensuse"
|
|||
SPCD_OS_ROCKY="rocky"
|
||||
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_APT="apt"
|
||||
SPCD_PM_DNF="dnf"
|
||||
|
|
Loading…
Reference in a new issue