cd_pm
This commit is contained in:
parent
64c65167ba
commit
794165c012
1 changed files with 18 additions and 6 deletions
24
cd.sh
24
cd.sh
|
@ -134,8 +134,23 @@ cd_set_environment_variables () {
|
|||
cd_echo "CD_CA_ROOT" "CD_CMD_CA"
|
||||
# set package manager
|
||||
case "${CD_OS_ID}" in
|
||||
"${CD_OS_ALPINE}")
|
||||
CD_PM="${CD_PM_APK}"
|
||||
;;
|
||||
"${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}")
|
||||
CD_PM="${CD_PM_APT}"
|
||||
;;
|
||||
"${CD_OS_ALMA}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}")
|
||||
CD_PM="${CD_PM_DNF}"
|
||||
;;
|
||||
"${CD_OS_ARCH}")
|
||||
CD_PM="${CD_PM_PACMAN}"
|
||||
;;
|
||||
esac
|
||||
cd_split
|
||||
cd_echo "CD_PM"
|
||||
case "${CD_PM}" in
|
||||
"${CD_PM_DNF}")
|
||||
CD_CMD_CLEAN="dnf clean all"
|
||||
CD_CMD_INSTALL="dnf install --assumeyes"
|
||||
CD_CMD_QUERY="rpm --query"
|
||||
|
@ -154,8 +169,7 @@ skip_if_unavailable=False
|
|||
CD_PM_HTTPS_PATH="/etc/dnf/dnf.conf.d/https.conf"
|
||||
CD_PM_HTTPS_TEXT="sslverify=False"
|
||||
;;
|
||||
"${CD_OS_ALPINE}")
|
||||
CD_PM="${CD_PM_APK}"
|
||||
"${CD_PM_APK}")
|
||||
CD_CMD_CLEAN="apk cache purge"
|
||||
CD_CMD_INSTALL="apk add"
|
||||
CD_CMD_QUERY="apk info"
|
||||
|
@ -167,8 +181,7 @@ skip_if_unavailable=False
|
|||
CD_PM_HTTPS_PATH="/etc/apk/repositories.d/https"
|
||||
CD_PM_HTTPS_TEXT="--no-verify"
|
||||
;;
|
||||
"${CD_OS_ARCH}")
|
||||
CD_PM="${CD_PM_PACMAN}"
|
||||
"${CD_PM_PACMAN}")
|
||||
CD_CMD_CLEAN="pacman --sync --clean --noconfirm"
|
||||
CD_CMD_INSTALL="pacman --sync --noconfirm"
|
||||
CD_CMD_QUERY="pacman --query"
|
||||
|
@ -180,8 +193,7 @@ skip_if_unavailable=False
|
|||
CD_PM_HTTPS_PATH="/etc/pacman.d/https.conf"
|
||||
CD_PM_HTTPS_TEXT="SSLVerify = No"
|
||||
;;
|
||||
"${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}")
|
||||
CD_PM="${CD_PM_APT}"
|
||||
"${CD_PM_APT}")
|
||||
CD_CMD_CLEAN="apt-get clean"
|
||||
CD_CMD_INSTALL="apt-get install --assume-yes"
|
||||
CD_CMD_QUERY="dpkg-query --show"
|
||||
|
|
Loading…
Reference in a new issue