Compare commits
6 commits
74e2335cdb
...
164420d418
Author | SHA1 | Date | |
---|---|---|---|
164420d418 | |||
81db5ca397 | |||
f136bd1f07 | |||
19eee535c5 | |||
9972005755 | |||
dd1a9ed807 |
2 changed files with 32 additions and 25 deletions
|
@ -238,7 +238,6 @@ 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
|
||||||
|
|
|
@ -247,6 +247,13 @@ nameserver ${value}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spcd_eval() {
|
||||||
|
if [ -n "${1}" ]; then
|
||||||
|
echo "${@}"
|
||||||
|
eval "${@}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# ╭───────────┬───────╮
|
# ╭───────────┬───────╮
|
||||||
# │ functions │ error │
|
# │ functions │ error │
|
||||||
# ╰───────────┴───────╯
|
# ╰───────────┴───────╯
|
||||||
|
@ -776,11 +783,11 @@ spcd_step__environment_list_workspace() {
|
||||||
|
|
||||||
spcd_clean_cache() {
|
spcd_clean_cache() {
|
||||||
case "${SPCD_PM}" in
|
case "${SPCD_PM}" in
|
||||||
"${SPCD_PM_APK}") apk cache purge ;;
|
"${SPCD_PM_APK}") spcd_eval apk cache purge ;;
|
||||||
"${SPCD_PM_APT}") apt-get clean ;;
|
"${SPCD_PM_APT}") spcd_eval apt-get clean ;;
|
||||||
"${SPCD_PM_DNF}") dnf clean all ;;
|
"${SPCD_PM_DNF}") spcd_eval dnf clean all ;;
|
||||||
"${SPCD_PM_PACMAN}") pacman --sync --clean --noconfirm ;;
|
"${SPCD_PM_PACMAN}") spcd_eval pacman --sync --clean --noconfirm ;;
|
||||||
"${SPCD_PM_ZYPPER}") zypper clean ;;
|
"${SPCD_PM_ZYPPER}") spcd_eval zypper clean ;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -819,11 +826,11 @@ spcd_https_path() {
|
||||||
|
|
||||||
spcd_install_package() {
|
spcd_install_package() {
|
||||||
case "${SPCD_PM}" in
|
case "${SPCD_PM}" in
|
||||||
"${SPCD_PM_APK}") apk add "${1}" ;;
|
"${SPCD_PM_APK}") spcd_eval apk add "${1}" ;;
|
||||||
"${SPCD_PM_APT}") apt-get install --assume-yes "${1}" ;;
|
"${SPCD_PM_APT}") spcd_eval apt-get install --assume-yes "${1}" ;;
|
||||||
"${SPCD_PM_DNF}") dnf install --assumeyes "${1}" ;;
|
"${SPCD_PM_DNF}") spcd_eval dnf install --assumeyes "${1}" ;;
|
||||||
"${SPCD_PM_PACMAN}") pacman --sync --noconfirm "${1}" ;;
|
"${SPCD_PM_PACMAN}") spcd_eval pacman --sync --noconfirm "${1}" ;;
|
||||||
"${SPCD_PM_ZYPPER}") zypper --non-interactive install "${1}" ;;
|
"${SPCD_PM_ZYPPER}") spcd_eval zypper --non-interactive install "${1}" ;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
spcd_clean_cache
|
spcd_clean_cache
|
||||||
|
@ -1006,7 +1013,7 @@ ${name}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET}
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
"list")
|
"list")
|
||||||
if ! locale --all-locales; then
|
if ! spcd_eval locale --all-locales; then
|
||||||
echo "No locales yet!"
|
echo "No locales yet!"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
@ -1198,10 +1205,11 @@ Dir::Etc::SourceParts \"\";
|
||||||
esac
|
esac
|
||||||
case "${SPCD_OS_ID}" in
|
case "${SPCD_OS_ID}" in
|
||||||
"${SPCD_OS_ARCH}")
|
"${SPCD_OS_ARCH}")
|
||||||
pacman-key --init
|
spcd_eval 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
|
||||||
|
@ -1239,11 +1247,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}") apk update ;;
|
"${SPCD_PM_APK}") spcd_eval apk update ;;
|
||||||
"${SPCD_PM_APT}") apt-get update ;;
|
"${SPCD_PM_APT}") spcd_eval apt-get update ;;
|
||||||
"${SPCD_PM_DNF}") dnf makecache ;;
|
"${SPCD_PM_DNF}") spcd_eval dnf makecache ;;
|
||||||
"${SPCD_PM_PACMAN}") pacman --sync --refresh ;;
|
"${SPCD_PM_PACMAN}") spcd_eval pacman --sync --refresh ;;
|
||||||
"${SPCD_PM_ZYPPER}") zypper refresh ;;
|
"${SPCD_PM_ZYPPER}") spcd_eval zypper refresh ;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -1305,13 +1313,13 @@ spcd_step__ca_update_certificates() {
|
||||||
"${SPCD_OS_ALMA}" | \
|
"${SPCD_OS_ALMA}" | \
|
||||||
"${SPCD_OS_FEDORA}" | \
|
"${SPCD_OS_FEDORA}" | \
|
||||||
"${SPCD_OS_ROCKY}")
|
"${SPCD_OS_ROCKY}")
|
||||||
update-ca-trust
|
spcd_eval 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}")
|
||||||
update-ca-certificates
|
spcd_eval update-ca-certificates
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
|
@ -1333,11 +1341,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}") apk upgrade ;;
|
"${SPCD_PM_APK}") spcd_eval apk upgrade ;;
|
||||||
"${SPCD_PM_APT}") apt-get upgrade --assume-yes ;;
|
"${SPCD_PM_APT}") spcd_eval apt-get upgrade --assume-yes ;;
|
||||||
"${SPCD_PM_DNF}") dnf upgrade --assumeyes ;;
|
"${SPCD_PM_DNF}") spcd_eval dnf upgrade --assumeyes ;;
|
||||||
"${SPCD_PM_PACMAN}") pacman --sync --sysupgrade --noconfirm ;;
|
"${SPCD_PM_PACMAN}") spcd_eval pacman --sync --sysupgrade --noconfirm ;;
|
||||||
"${SPCD_PM_ZYPPER}") zypper --non-interactive update ;;
|
"${SPCD_PM_ZYPPER}") spcd_eval zypper --non-interactive update ;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue