parent
f2c422c909
commit
da2b2fa97a
1 changed files with 10 additions and 2 deletions
12
cd.sh
12
cd.sh
|
@ -135,6 +135,7 @@ cd_set_environment_variables () {
|
||||||
# common
|
# common
|
||||||
case "${CD_OS_ID}" in
|
case "${CD_OS_ID}" in
|
||||||
"${CD_OS_ALMA}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}")
|
"${CD_OS_ALMA}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}")
|
||||||
|
CD_PM="${CD_PM_DNF}"
|
||||||
CD_CMD_CLEAN="dnf clean all"
|
CD_CMD_CLEAN="dnf clean all"
|
||||||
CD_CMD_INSTALL="dnf install --assumeyes"
|
CD_CMD_INSTALL="dnf install --assumeyes"
|
||||||
CD_CMD_QUERY="rpm --query"
|
CD_CMD_QUERY="rpm --query"
|
||||||
|
@ -154,6 +155,7 @@ skip_if_unavailable=False
|
||||||
CD_PM_HTTPS_TEXT="sslverify=False"
|
CD_PM_HTTPS_TEXT="sslverify=False"
|
||||||
;;
|
;;
|
||||||
"${CD_OS_ALPINE}")
|
"${CD_OS_ALPINE}")
|
||||||
|
CD_PM="${CD_PM_APK}"
|
||||||
CD_CMD_CLEAN="apk cache purge"
|
CD_CMD_CLEAN="apk cache purge"
|
||||||
CD_CMD_INSTALL="apk add"
|
CD_CMD_INSTALL="apk add"
|
||||||
CD_CMD_QUERY="apk info"
|
CD_CMD_QUERY="apk info"
|
||||||
|
@ -166,6 +168,7 @@ skip_if_unavailable=False
|
||||||
CD_PM_HTTPS_TEXT="--no-verify"
|
CD_PM_HTTPS_TEXT="--no-verify"
|
||||||
;;
|
;;
|
||||||
"${CD_OS_ARCH}")
|
"${CD_OS_ARCH}")
|
||||||
|
CD_PM="${CD_PM_PACMAN}"
|
||||||
CD_CMD_CLEAN="pacman --sync --clean --noconfirm"
|
CD_CMD_CLEAN="pacman --sync --clean --noconfirm"
|
||||||
CD_CMD_INSTALL="pacman --sync --noconfirm"
|
CD_CMD_INSTALL="pacman --sync --noconfirm"
|
||||||
CD_CMD_QUERY="pacman --query"
|
CD_CMD_QUERY="pacman --query"
|
||||||
|
@ -178,6 +181,7 @@ skip_if_unavailable=False
|
||||||
CD_PM_HTTPS_TEXT="SSLVerify = No"
|
CD_PM_HTTPS_TEXT="SSLVerify = No"
|
||||||
;;
|
;;
|
||||||
"${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}")
|
"${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}")
|
||||||
|
CD_PM="${CD_PM_APT}"
|
||||||
CD_CMD_CLEAN="apt-get clean"
|
CD_CMD_CLEAN="apt-get clean"
|
||||||
CD_CMD_INSTALL="apt-get install --assume-yes"
|
CD_CMD_INSTALL="apt-get install --assume-yes"
|
||||||
CD_CMD_QUERY="dpkg-query --show"
|
CD_CMD_QUERY="dpkg-query --show"
|
||||||
|
@ -405,8 +409,7 @@ cd_list_working_directory () {
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_set_https_verification_off () {
|
cd_set_https_verification_off () {
|
||||||
# TODO
|
if [ "${CD_CA}" -o "${CD_PM}" = "${CD_PM_APT}" ] ; then
|
||||||
if [ "${CD_CA}" -o "${CD_OS_ID}" = "${CD_OS_DEBIAN}" ] ; then
|
|
||||||
cd_step "Set HTTPS verification off"
|
cd_step "Set HTTPS verification off"
|
||||||
cd_mkdir "$(dirname "${CD_PM_HTTPS_PATH}")"
|
cd_mkdir "$(dirname "${CD_PM_HTTPS_PATH}")"
|
||||||
cd_write "${CD_PM_HTTPS_PATH}" "${CD_PM_HTTPS_TEXT}"
|
cd_write "${CD_PM_HTTPS_PATH}" "${CD_PM_HTTPS_TEXT}"
|
||||||
|
@ -669,5 +672,10 @@ CD_OS_FEDORA="fedora"
|
||||||
CD_OS_ROCKY="rocky"
|
CD_OS_ROCKY="rocky"
|
||||||
CD_OS_UBUNTU="ubuntu"
|
CD_OS_UBUNTU="ubuntu"
|
||||||
|
|
||||||
|
CD_PM_APK="apk"
|
||||||
|
CD_PM_APT="apt"
|
||||||
|
CD_PM_DNF="dnf"
|
||||||
|
CD_PM_PACMAN="pacman"
|
||||||
|
|
||||||
# run
|
# run
|
||||||
cd_main
|
cd_main
|
||||||
|
|
Loading…
Reference in a new issue