Compare commits

..

No commits in common. "164420d418a3dcfafc94db63c6e0394856d2406a" and "74e2335cdb6a06d5294261e0bd79c59e79f9d37f" have entirely different histories.

2 changed files with 25 additions and 32 deletions

View file

@ -238,6 +238,7 @@ Handle project workflows in a unified way:
* disable & enable https * disable & enable https
* locales * locales
* persist * persist
* restrict LC_* variables set for alpine
* test * test
#### Shell → Python #### Shell → Python

View file

@ -247,13 +247,6 @@ nameserver ${value}
fi fi
} }
spcd_eval() {
if [ -n "${1}" ]; then
echo "${@}"
eval "${@}"
fi
}
# ╭───────────┬───────╮ # ╭───────────┬───────╮
# │ functions │ error │ # │ functions │ error │
# ╰───────────┴───────╯ # ╰───────────┴───────╯
@ -783,11 +776,11 @@ spcd_step__environment_list_workspace() {
spcd_clean_cache() { spcd_clean_cache() {
case "${SPCD_PM}" in case "${SPCD_PM}" in
"${SPCD_PM_APK}") spcd_eval apk cache purge ;; "${SPCD_PM_APK}") apk cache purge ;;
"${SPCD_PM_APT}") spcd_eval apt-get clean ;; "${SPCD_PM_APT}") apt-get clean ;;
"${SPCD_PM_DNF}") spcd_eval dnf clean all ;; "${SPCD_PM_DNF}") dnf clean all ;;
"${SPCD_PM_PACMAN}") spcd_eval pacman --sync --clean --noconfirm ;; "${SPCD_PM_PACMAN}") pacman --sync --clean --noconfirm ;;
"${SPCD_PM_ZYPPER}") spcd_eval zypper clean ;; "${SPCD_PM_ZYPPER}") zypper clean ;;
*) ;; *) ;;
esac esac
} }
@ -826,11 +819,11 @@ spcd_https_path() {
spcd_install_package() { spcd_install_package() {
case "${SPCD_PM}" in case "${SPCD_PM}" in
"${SPCD_PM_APK}") spcd_eval apk add "${1}" ;; "${SPCD_PM_APK}") apk add "${1}" ;;
"${SPCD_PM_APT}") spcd_eval apt-get install --assume-yes "${1}" ;; "${SPCD_PM_APT}") apt-get install --assume-yes "${1}" ;;
"${SPCD_PM_DNF}") spcd_eval dnf install --assumeyes "${1}" ;; "${SPCD_PM_DNF}") dnf install --assumeyes "${1}" ;;
"${SPCD_PM_PACMAN}") spcd_eval pacman --sync --noconfirm "${1}" ;; "${SPCD_PM_PACMAN}") pacman --sync --noconfirm "${1}" ;;
"${SPCD_PM_ZYPPER}") spcd_eval zypper --non-interactive install "${1}" ;; "${SPCD_PM_ZYPPER}") zypper --non-interactive install "${1}" ;;
*) ;; *) ;;
esac esac
spcd_clean_cache spcd_clean_cache
@ -1013,7 +1006,7 @@ ${name}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET}
done done
;; ;;
"list") "list")
if ! spcd_eval locale --all-locales; then if ! locale --all-locales; then
echo "No locales yet!" echo "No locales yet!"
fi fi
;; ;;
@ -1205,11 +1198,10 @@ Dir::Etc::SourceParts \"\";
esac esac
case "${SPCD_OS_ID}" in case "${SPCD_OS_ID}" in
"${SPCD_OS_ARCH}") "${SPCD_OS_ARCH}")
spcd_eval pacman-key --init pacman-key --init
;; ;;
"${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}") "${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}")
export DEBIAN_FRONTEND="noninteractive" export DEBIAN_FRONTEND="noninteractive"
spcd_os_printenv DEBIAN_FRONTEND
;; ;;
*) ;; *) ;;
esac esac
@ -1247,11 +1239,11 @@ SSLVerify = No
spcd_step__packages_update_catalog() { spcd_step__packages_update_catalog() {
spcd_step "Update catalog" spcd_step "Update catalog"
case "${SPCD_PM}" in case "${SPCD_PM}" in
"${SPCD_PM_APK}") spcd_eval apk update ;; "${SPCD_PM_APK}") apk update ;;
"${SPCD_PM_APT}") spcd_eval apt-get update ;; "${SPCD_PM_APT}") apt-get update ;;
"${SPCD_PM_DNF}") spcd_eval dnf makecache ;; "${SPCD_PM_DNF}") dnf makecache ;;
"${SPCD_PM_PACMAN}") spcd_eval pacman --sync --refresh ;; "${SPCD_PM_PACMAN}") pacman --sync --refresh ;;
"${SPCD_PM_ZYPPER}") spcd_eval zypper refresh ;; "${SPCD_PM_ZYPPER}") zypper refresh ;;
*) ;; *) ;;
esac esac
} }
@ -1313,13 +1305,13 @@ spcd_step__ca_update_certificates() {
"${SPCD_OS_ALMA}" | \ "${SPCD_OS_ALMA}" | \
"${SPCD_OS_FEDORA}" | \ "${SPCD_OS_FEDORA}" | \
"${SPCD_OS_ROCKY}") "${SPCD_OS_ROCKY}")
spcd_eval update-ca-trust update-ca-trust
;; ;;
"${SPCD_OS_ALPINE}" | \ "${SPCD_OS_ALPINE}" | \
"${SPCD_OS_DEBIAN}" | \ "${SPCD_OS_DEBIAN}" | \
"${SPCD_OS_OPENSUSE}" | \ "${SPCD_OS_OPENSUSE}" | \
"${SPCD_OS_UBUNTU}") "${SPCD_OS_UBUNTU}")
spcd_eval update-ca-certificates update-ca-certificates
;; ;;
*) ;; *) ;;
esac esac
@ -1341,11 +1333,11 @@ spcd_step__packages_verify_https() {
spcd_step__packages_upgrade_system() { spcd_step__packages_upgrade_system() {
spcd_step "Upgrade system" spcd_step "Upgrade system"
case "${SPCD_PM}" in case "${SPCD_PM}" in
"${SPCD_PM_APK}") spcd_eval apk upgrade ;; "${SPCD_PM_APK}") apk upgrade ;;
"${SPCD_PM_APT}") spcd_eval apt-get upgrade --assume-yes ;; "${SPCD_PM_APT}") apt-get upgrade --assume-yes ;;
"${SPCD_PM_DNF}") spcd_eval dnf upgrade --assumeyes ;; "${SPCD_PM_DNF}") dnf upgrade --assumeyes ;;
"${SPCD_PM_PACMAN}") spcd_eval pacman --sync --sysupgrade --noconfirm ;; "${SPCD_PM_PACMAN}") pacman --sync --sysupgrade --noconfirm ;;
"${SPCD_PM_ZYPPER}") spcd_eval zypper --non-interactive update ;; "${SPCD_PM_ZYPPER}") zypper --non-interactive update ;;
*) ;; *) ;;
esac esac
} }