cases
This commit is contained in:
parent
736a0174ed
commit
6e4692cb37
1 changed files with 178 additions and 178 deletions
356
pidd.sh
356
pidd.sh
|
@ -120,7 +120,7 @@ pidd_set_environment_variables() {
|
||||||
*) pidd_error_os "PIDD_OS_VERSION" ;;
|
*) pidd_error_os "PIDD_OS_VERSION" ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
pidd_split
|
pidd_split
|
||||||
pidd_echo "PIDD_OS_ID" "PIDD_OS_VERSION"
|
pidd_echo "PIDD_OS_ID" "PIDD_OS_VERSION"
|
||||||
|
@ -135,54 +135,54 @@ pidd_set_environment_variables() {
|
||||||
pidd_echo "PIDD_DNS_FILE" "PIDD_PKG_CA" "PIDD_PKG_GIT" "PIDD_PYTHON_ALIAS"
|
pidd_echo "PIDD_DNS_FILE" "PIDD_PKG_CA" "PIDD_PKG_GIT" "PIDD_PYTHON_ALIAS"
|
||||||
# set ca command & root
|
# set ca command & root
|
||||||
case "${PIDD_OS_ID}" in
|
case "${PIDD_OS_ID}" in
|
||||||
"${PIDD_OS_ALMA}" | "${PIDD_OS_FEDORA}" | "${PIDD_OS_ROCKY}")
|
"${PIDD_OS_ALMA}" | "${PIDD_OS_FEDORA}" | "${PIDD_OS_ROCKY}")
|
||||||
PIDD_CA_ROOT="/etc/pki/ca-trust/source/anchors"
|
PIDD_CA_ROOT="/etc/pki/ca-trust/source/anchors"
|
||||||
PIDD_CMD_CA="update-ca-trust"
|
PIDD_CMD_CA="update-ca-trust"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_ALPINE}")
|
"${PIDD_OS_ALPINE}")
|
||||||
PIDD_CA_ROOT="/usr/local/share/ca-certificates"
|
PIDD_CA_ROOT="/usr/local/share/ca-certificates"
|
||||||
PIDD_CMD_CA="update-ca-certificates"
|
PIDD_CMD_CA="update-ca-certificates"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_ARCH}")
|
"${PIDD_OS_ARCH}")
|
||||||
PIDD_CA_ROOT="/etc/ca-certificates/trust-source/anchors"
|
PIDD_CA_ROOT="/etc/ca-certificates/trust-source/anchors"
|
||||||
PIDD_CMD_CA="update-ca-trust"
|
PIDD_CMD_CA="update-ca-trust"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_DEBIAN}" | "${PIDD_OS_UBUNTU}")
|
"${PIDD_OS_DEBIAN}" | "${PIDD_OS_UBUNTU}")
|
||||||
PIDD_CA_ROOT="/usr/local/share/ca-certificates"
|
PIDD_CA_ROOT="/usr/local/share/ca-certificates"
|
||||||
PIDD_CMD_CA="update-ca-certificates"
|
PIDD_CMD_CA="update-ca-certificates"
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
pidd_split
|
pidd_split
|
||||||
pidd_echo "PIDD_CA_ROOT" "PIDD_CMD_CA"
|
pidd_echo "PIDD_CA_ROOT" "PIDD_CMD_CA"
|
||||||
# set package manager
|
# set package manager
|
||||||
case "${PIDD_OS_ID}" in
|
case "${PIDD_OS_ID}" in
|
||||||
"${PIDD_OS_ALPINE}")
|
"${PIDD_OS_ALPINE}")
|
||||||
PIDD_PM="${PIDD_PM_APK}"
|
PIDD_PM="${PIDD_PM_APK}"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_DEBIAN}" | "${PIDD_OS_UBUNTU}")
|
"${PIDD_OS_DEBIAN}" | "${PIDD_OS_UBUNTU}")
|
||||||
PIDD_PM="${PIDD_PM_APT}"
|
PIDD_PM="${PIDD_PM_APT}"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_ALMA}" | "${PIDD_OS_FEDORA}" | "${PIDD_OS_ROCKY}")
|
"${PIDD_OS_ALMA}" | "${PIDD_OS_FEDORA}" | "${PIDD_OS_ROCKY}")
|
||||||
PIDD_PM="${PIDD_PM_DNF}"
|
PIDD_PM="${PIDD_PM_DNF}"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_ARCH}")
|
"${PIDD_OS_ARCH}")
|
||||||
PIDD_PM="${PIDD_PM_PACMAN}"
|
PIDD_PM="${PIDD_PM_PACMAN}"
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
pidd_split
|
pidd_split
|
||||||
pidd_echo "PIDD_PM"
|
pidd_echo "PIDD_PM"
|
||||||
case "${PIDD_PM}" in
|
case "${PIDD_PM}" in
|
||||||
"${PIDD_PM_DNF}")
|
"${PIDD_PM_DNF}")
|
||||||
PIDD_PM_CLEAN="dnf clean all"
|
PIDD_PM_CLEAN="dnf clean all"
|
||||||
PIDD_PM_INSTALL="dnf install --assumeyes"
|
PIDD_PM_INSTALL="dnf install --assumeyes"
|
||||||
PIDD_PM_QUERY="rpm --query"
|
PIDD_PM_QUERY="rpm --query"
|
||||||
PIDD_PM_UPDATE="dnf makecache"
|
PIDD_PM_UPDATE="dnf makecache"
|
||||||
PIDD_PM_UPGRADE="dnf upgrade --assumeyes"
|
PIDD_PM_UPGRADE="dnf upgrade --assumeyes"
|
||||||
PIDD_PKG_PKG=""
|
PIDD_PKG_PKG=""
|
||||||
PIDD_PM_CONF_PATH="/etc/dnf/dnf.conf"
|
PIDD_PM_CONF_PATH="/etc/dnf/dnf.conf"
|
||||||
PIDD_PM_CONF_TEXT="\
|
PIDD_PM_CONF_TEXT="\
|
||||||
[main]
|
[main]
|
||||||
best=True
|
best=True
|
||||||
clean_requirements_on_remove=True
|
clean_requirements_on_remove=True
|
||||||
|
@ -190,60 +190,60 @@ gpgcheck=1
|
||||||
installonly_limit=3
|
installonly_limit=3
|
||||||
skip_if_unavailable=False
|
skip_if_unavailable=False
|
||||||
"
|
"
|
||||||
PIDD_PM_HTTPS_PATH="/etc/dnf/dnf.conf.d/https.conf"
|
PIDD_PM_HTTPS_PATH="/etc/dnf/dnf.conf.d/https.conf"
|
||||||
PIDD_PM_HTTPS_TEXT="\
|
PIDD_PM_HTTPS_TEXT="\
|
||||||
sslverify=False
|
sslverify=False
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
"${PIDD_PM_APK}")
|
"${PIDD_PM_APK}")
|
||||||
PIDD_PM_CLEAN="apk cache purge"
|
PIDD_PM_CLEAN="apk cache purge"
|
||||||
PIDD_PM_INSTALL="apk add"
|
PIDD_PM_INSTALL="apk add"
|
||||||
PIDD_PM_QUERY="apk info"
|
PIDD_PM_QUERY="apk info"
|
||||||
PIDD_PM_UPDATE="apk update"
|
PIDD_PM_UPDATE="apk update"
|
||||||
PIDD_PM_UPGRADE="apk upgrade"
|
PIDD_PM_UPGRADE="apk upgrade"
|
||||||
PIDD_PKG_PKG=""
|
PIDD_PKG_PKG=""
|
||||||
PIDD_PM_CONF_PATH=""
|
PIDD_PM_CONF_PATH=""
|
||||||
PIDD_PM_CONF_TEXT=""
|
PIDD_PM_CONF_TEXT=""
|
||||||
PIDD_PM_HTTPS_PATH="/etc/apk/repositories.d/https"
|
PIDD_PM_HTTPS_PATH="/etc/apk/repositories.d/https"
|
||||||
PIDD_PM_HTTPS_TEXT="\
|
PIDD_PM_HTTPS_TEXT="\
|
||||||
--no-verify
|
--no-verify
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
"${PIDD_PM_PACMAN}")
|
"${PIDD_PM_PACMAN}")
|
||||||
PIDD_PM_CLEAN="pacman --sync --clean --noconfirm"
|
PIDD_PM_CLEAN="pacman --sync --clean --noconfirm"
|
||||||
PIDD_PM_INSTALL="pacman --sync --noconfirm"
|
PIDD_PM_INSTALL="pacman --sync --noconfirm"
|
||||||
PIDD_PM_QUERY="pacman --query"
|
PIDD_PM_QUERY="pacman --query"
|
||||||
PIDD_PM_UPDATE="pacman --sync --refresh"
|
PIDD_PM_UPDATE="pacman --sync --refresh"
|
||||||
PIDD_PM_UPGRADE="pacman --sync --sysupgrade --noconfirm"
|
PIDD_PM_UPGRADE="pacman --sync --sysupgrade --noconfirm"
|
||||||
PIDD_PKG_PKG=""
|
PIDD_PKG_PKG=""
|
||||||
PIDD_PM_CONF_PATH=""
|
PIDD_PM_CONF_PATH=""
|
||||||
PIDD_PM_CONF_TEXT=""
|
PIDD_PM_CONF_TEXT=""
|
||||||
PIDD_PM_HTTPS_PATH="/etc/pacman.d/https.conf"
|
PIDD_PM_HTTPS_PATH="/etc/pacman.d/https.conf"
|
||||||
PIDD_PM_HTTPS_TEXT="\
|
PIDD_PM_HTTPS_TEXT="\
|
||||||
SSLVerify = No
|
SSLVerify = No
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
"${PIDD_PM_APT}")
|
"${PIDD_PM_APT}")
|
||||||
PIDD_PM_CLEAN="apt-get clean"
|
PIDD_PM_CLEAN="apt-get clean"
|
||||||
PIDD_PM_INSTALL="apt-get install --assume-yes"
|
PIDD_PM_INSTALL="apt-get install --assume-yes"
|
||||||
PIDD_PM_QUERY="dpkg-query --show"
|
PIDD_PM_QUERY="dpkg-query --show"
|
||||||
PIDD_PM_UPDATE="apt-get update"
|
PIDD_PM_UPDATE="apt-get update"
|
||||||
PIDD_PM_UPGRADE="apt-get upgrade --assume-yes"
|
PIDD_PM_UPGRADE="apt-get upgrade --assume-yes"
|
||||||
PIDD_PKG_PKG="apt-utils"
|
PIDD_PKG_PKG="apt-utils"
|
||||||
PIDD_PM_CONF_PATH="/etc/apt/apt.conf.d/apt.conf"
|
PIDD_PM_CONF_PATH="/etc/apt/apt.conf.d/apt.conf"
|
||||||
PIDD_PM_CONF_TEXT="\
|
PIDD_PM_CONF_TEXT="\
|
||||||
Acquire::Check-Valid-Until True;
|
Acquire::Check-Valid-Until True;
|
||||||
APT::Get::Show-Versions True;
|
APT::Get::Show-Versions True;
|
||||||
APT::Install-Recommends False;
|
APT::Install-Recommends False;
|
||||||
APT::Install-Suggests False;
|
APT::Install-Suggests False;
|
||||||
Dir::Etc::SourceParts \"\";
|
Dir::Etc::SourceParts \"\";
|
||||||
"
|
"
|
||||||
PIDD_PM_HTTPS_PATH="/etc/apt/apt.conf.d/https"
|
PIDD_PM_HTTPS_PATH="/etc/apt/apt.conf.d/https"
|
||||||
PIDD_PM_HTTPS_TEXT="\
|
PIDD_PM_HTTPS_TEXT="\
|
||||||
Acquire::https::Verify-Peer False;
|
Acquire::https::Verify-Peer False;
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
pidd_split
|
pidd_split
|
||||||
pidd_echo "PIDD_PM_CLEAN" \
|
pidd_echo "PIDD_PM_CLEAN" \
|
||||||
|
@ -252,108 +252,108 @@ Acquire::https::Verify-Peer False;
|
||||||
pidd_echo "PIDD_PKG_PKG" "PIDD_PM_CONF_PATH" "PIDD_PM_HTTPS_PATH"
|
pidd_echo "PIDD_PKG_PKG" "PIDD_PM_CONF_PATH" "PIDD_PM_HTTPS_PATH"
|
||||||
# specific
|
# specific
|
||||||
case "${PIDD_OS_ID}" in
|
case "${PIDD_OS_ID}" in
|
||||||
"${PIDD_OS_ALMA}")
|
"${PIDD_OS_ALMA}")
|
||||||
PIDD_URL_DEFAULT="https://repo.almalinux.org/almalinux"
|
PIDD_URL_DEFAULT="https://repo.almalinux.org/almalinux"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_ALPINE}")
|
"${PIDD_OS_ALPINE}")
|
||||||
PIDD_URL_DEFAULT="https://dl-cdn.alpinelinux.org/alpine"
|
PIDD_URL_DEFAULT="https://dl-cdn.alpinelinux.org/alpine"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_ARCH}")
|
"${PIDD_OS_ARCH}")
|
||||||
PIDD_URL_DEFAULT="https://geo.mirror.pkgbuild.com"
|
PIDD_URL_DEFAULT="https://geo.mirror.pkgbuild.com"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_DEBIAN}")
|
"${PIDD_OS_DEBIAN}")
|
||||||
PIDD_URL_DEFAULT="http://deb.debian.org/debian"
|
PIDD_URL_DEFAULT="http://deb.debian.org/debian"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_FEDORA}")
|
"${PIDD_OS_FEDORA}")
|
||||||
PIDD_URL_DEFAULT="http://download.example/pub/fedora/linux/releases"
|
PIDD_URL_DEFAULT="http://download.example/pub/fedora/linux/releases"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_ROCKY}")
|
"${PIDD_OS_ROCKY}")
|
||||||
PIDD_URL_DEFAULT="http://dl.rockylinux.org/\$contentdir"
|
PIDD_URL_DEFAULT="http://dl.rockylinux.org/\$contentdir"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_UBUNTU}")
|
"${PIDD_OS_UBUNTU}")
|
||||||
PIDD_URL_DEFAULT="http://archive.ubuntu.com/ubuntu"
|
PIDD_URL_DEFAULT="http://archive.ubuntu.com/ubuntu"
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
PIDD_URL_CHOSEN="${PIDD_URL_DEFAULT}"
|
PIDD_URL_CHOSEN="${PIDD_URL_DEFAULT}"
|
||||||
case "${PIDD_OS_ID}" in
|
case "${PIDD_OS_ID}" in
|
||||||
"${PIDD_OS_ALMA}")
|
"${PIDD_OS_ALMA}")
|
||||||
[ -n "${PIDD_URL_ALMA}" ] && PIDD_URL_CHOSEN="${PIDD_URL_ALMA}"
|
[ -n "${PIDD_URL_ALMA}" ] && PIDD_URL_CHOSEN="${PIDD_URL_ALMA}"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_ALPINE}")
|
"${PIDD_OS_ALPINE}")
|
||||||
[ -n "${PIDD_URL_ALPINE}" ] && PIDD_URL_CHOSEN="${PIDD_URL_ALPINE}"
|
[ -n "${PIDD_URL_ALPINE}" ] && PIDD_URL_CHOSEN="${PIDD_URL_ALPINE}"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_ARCH}")
|
"${PIDD_OS_ARCH}")
|
||||||
[ -n "${PIDD_URL_ARCH}" ] && PIDD_URL_CHOSEN="${PIDD_URL_ARCH}"
|
[ -n "${PIDD_URL_ARCH}" ] && PIDD_URL_CHOSEN="${PIDD_URL_ARCH}"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_DEBIAN}")
|
"${PIDD_OS_DEBIAN}")
|
||||||
[ -n "${PIDD_URL_DEBIAN}" ] && PIDD_URL_CHOSEN="${PIDD_URL_DEBIAN}" \
|
[ -n "${PIDD_URL_DEBIAN}" ] && PIDD_URL_CHOSEN="${PIDD_URL_DEBIAN}" \
|
||||||
|| PIDD_URL_CHOSEN="https://deb.debian.org/debian"
|
|| PIDD_URL_CHOSEN="https://deb.debian.org/debian"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_FEDORA}")
|
"${PIDD_OS_FEDORA}")
|
||||||
[ -n "${PIDD_URL_FEDORA}" ] && PIDD_URL_CHOSEN="${PIDD_URL_FEDORA}" \
|
[ -n "${PIDD_URL_FEDORA}" ] && PIDD_URL_CHOSEN="${PIDD_URL_FEDORA}" \
|
||||||
|| PIDD_URL_CHOSEN="https://rpmfind.net/linux/fedora/linux/releases"
|
|| PIDD_URL_CHOSEN="https://rpmfind.net/linux/fedora/linux/releases"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_ROCKY}")
|
"${PIDD_OS_ROCKY}")
|
||||||
[ -n "${PIDD_URL_ROCKY}" ] && PIDD_URL_CHOSEN="${PIDD_URL_ROCKY}" \
|
[ -n "${PIDD_URL_ROCKY}" ] && PIDD_URL_CHOSEN="${PIDD_URL_ROCKY}" \
|
||||||
|| PIDD_URL_CHOSEN="https://dl.rockylinux.org/\$contentdir"
|
|| PIDD_URL_CHOSEN="https://dl.rockylinux.org/\$contentdir"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_UBUNTU}")
|
"${PIDD_OS_UBUNTU}")
|
||||||
[ -n "${PIDD_URL_UBUNTU}" ] && PIDD_URL_CHOSEN="${PIDD_URL_UBUNTU}" \
|
[ -n "${PIDD_URL_UBUNTU}" ] && PIDD_URL_CHOSEN="${PIDD_URL_UBUNTU}" \
|
||||||
|| PIDD_URL_CHOSEN="https://ubuntu.mirrors.ovh.net/ubuntu"
|
|| PIDD_URL_CHOSEN="https://ubuntu.mirrors.ovh.net/ubuntu"
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
pidd_split
|
pidd_split
|
||||||
pidd_echo "PIDD_URL_DEFAULT" "PIDD_URL_CHOSEN"
|
pidd_echo "PIDD_URL_DEFAULT" "PIDD_URL_CHOSEN"
|
||||||
# set python command & package
|
# set python command & package
|
||||||
case "${PIDD_OS_ID}" in
|
case "${PIDD_OS_ID}" in
|
||||||
"${PIDD_OS_ALMA}" | "${PIDD_OS_ROCKY}")
|
"${PIDD_OS_ALMA}" | "${PIDD_OS_ROCKY}")
|
||||||
PIDD_PYTHON_COMMAND="python3.11"
|
PIDD_PYTHON_COMMAND="python3.11"
|
||||||
PIDD_PYTHON_PACKAGE="python3.11"
|
PIDD_PYTHON_PACKAGE="python3.11"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_ALPINE}")
|
"${PIDD_OS_ALPINE}")
|
||||||
PIDD_PYTHON_COMMAND="python3.11"
|
PIDD_PYTHON_COMMAND="python3.11"
|
||||||
PIDD_PYTHON_PACKAGE="python3"
|
PIDD_PYTHON_PACKAGE="python3"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_ARCH}")
|
"${PIDD_OS_ARCH}")
|
||||||
PIDD_PYTHON_COMMAND="python3.12"
|
PIDD_PYTHON_COMMAND="python3.12"
|
||||||
PIDD_PYTHON_PACKAGE="python"
|
PIDD_PYTHON_PACKAGE="python"
|
||||||
;;
|
|
||||||
"${PIDD_OS_DEBIAN}")
|
|
||||||
case "${PIDD_OS_VERSION}" in
|
|
||||||
"bookworm") PIDD_PYTHON_COMMAND="python3.11" ;;
|
|
||||||
"bullseye") PIDD_PYTHON_COMMAND="python3.9" ;;
|
|
||||||
*) ;;
|
|
||||||
esac
|
|
||||||
PIDD_PYTHON_PACKAGE="python3"
|
|
||||||
;;
|
|
||||||
"${PIDD_OS_FEDORA}")
|
|
||||||
PIDD_PYTHON_COMMAND="python3.12"
|
|
||||||
PIDD_PYTHON_PACKAGE="python3"
|
|
||||||
;;
|
|
||||||
"${PIDD_OS_UBUNTU}")
|
|
||||||
case "${PIDD_OS_VERSION}" in
|
|
||||||
"noble") PIDD_PYTHON_COMMAND="python3.12" ;;
|
|
||||||
"jammy") PIDD_PYTHON_COMMAND="python3.10" ;;
|
|
||||||
*) ;;
|
|
||||||
esac
|
|
||||||
PIDD_PYTHON_PACKAGE="python3"
|
|
||||||
;;
|
;;
|
||||||
|
"${PIDD_OS_DEBIAN}")
|
||||||
|
case "${PIDD_OS_VERSION}" in
|
||||||
|
"bookworm") PIDD_PYTHON_COMMAND="python3.11" ;;
|
||||||
|
"bullseye") PIDD_PYTHON_COMMAND="python3.9" ;;
|
||||||
*) ;;
|
*) ;;
|
||||||
|
esac
|
||||||
|
PIDD_PYTHON_PACKAGE="python3"
|
||||||
|
;;
|
||||||
|
"${PIDD_OS_FEDORA}")
|
||||||
|
PIDD_PYTHON_COMMAND="python3.12"
|
||||||
|
PIDD_PYTHON_PACKAGE="python3"
|
||||||
|
;;
|
||||||
|
"${PIDD_OS_UBUNTU}")
|
||||||
|
case "${PIDD_OS_VERSION}" in
|
||||||
|
"noble") PIDD_PYTHON_COMMAND="python3.12" ;;
|
||||||
|
"jammy") PIDD_PYTHON_COMMAND="python3.10" ;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
PIDD_PYTHON_PACKAGE="python3"
|
||||||
|
;;
|
||||||
|
*) ;;
|
||||||
esac
|
esac
|
||||||
# set python packages
|
# set python packages
|
||||||
case "${PIDD_OS_ID}" in
|
case "${PIDD_OS_ID}" in
|
||||||
"${PIDD_OS_ALMA}" | "${PIDD_OS_FEDORA}" | "${PIDD_OS_ROCKY}")
|
"${PIDD_OS_ALMA}" | "${PIDD_OS_FEDORA}" | "${PIDD_OS_ROCKY}")
|
||||||
PIDD_PYTHON_PACKAGES="/usr/lib64/${PIDD_PYTHON_COMMAND}/site-packages"
|
PIDD_PYTHON_PACKAGES="/usr/lib64/${PIDD_PYTHON_COMMAND}/site-packages"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_ALPINE}" | "${PIDD_OS_ARCH}")
|
"${PIDD_OS_ALPINE}" | "${PIDD_OS_ARCH}")
|
||||||
PIDD_PYTHON_PACKAGES="/usr/lib/${PIDD_PYTHON_COMMAND}/site-packages"
|
PIDD_PYTHON_PACKAGES="/usr/lib/${PIDD_PYTHON_COMMAND}/site-packages"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_DEBIAN}" | "${PIDD_OS_UBUNTU}")
|
"${PIDD_OS_DEBIAN}" | "${PIDD_OS_UBUNTU}")
|
||||||
PIDD_PYTHON_PACKAGES="/usr/lib/${PIDD_PYTHON_ALIAS}/dist-packages"
|
PIDD_PYTHON_PACKAGES="/usr/lib/${PIDD_PYTHON_ALIAS}/dist-packages"
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
pidd_split
|
pidd_split
|
||||||
pidd_echo "PIDD_PYTHON_COMMAND" "PIDD_PYTHON_PACKAGE" "PIDD_PYTHON_PACKAGES"
|
pidd_echo "PIDD_PYTHON_COMMAND" "PIDD_PYTHON_PACKAGE" "PIDD_PYTHON_PACKAGES"
|
||||||
|
@ -433,64 +433,64 @@ Acquire::https::Verify-Peer False;
|
||||||
"PIDD_PROJECT_PATH" "PIDD_PROJECT_NAME" "PIDD_PROJECT_BRANCH"
|
"PIDD_PROJECT_PATH" "PIDD_PROJECT_NAME" "PIDD_PROJECT_BRANCH"
|
||||||
# TODO move to Python
|
# TODO move to Python
|
||||||
case "${PIDD_PM}" in
|
case "${PIDD_PM}" in
|
||||||
"${PIDD_PM_APK}" | "${PIDD_PM_APT}") PIDD_PKG_SSH="openssh-client" ;;
|
"${PIDD_PM_APK}" | "${PIDD_PM_APT}") PIDD_PKG_SSH="openssh-client" ;;
|
||||||
"${PIDD_PM_DNF}") PIDD_PKG_SSH="openssh-clients" ;;
|
"${PIDD_PM_DNF}") PIDD_PKG_SSH="openssh-clients" ;;
|
||||||
"${PIDD_PM_PACMAN}") PIDD_PKG_SSH="openssh" ;;
|
"${PIDD_PM_PACMAN}") PIDD_PKG_SSH="openssh" ;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
pidd_set_packages_repositories() {
|
pidd_set_packages_repositories() {
|
||||||
pidd_step "Set packages repositories"
|
pidd_step "Set packages repositories"
|
||||||
case "${PIDD_OS_ID}" in
|
case "${PIDD_OS_ID}" in
|
||||||
"${PIDD_OS_ALMA}")
|
"${PIDD_OS_ALMA}")
|
||||||
case "${PIDD_OS_VERSION}" in
|
case "${PIDD_OS_VERSION}" in
|
||||||
"8") pidd_spr__file="/etc/yum.repos.d/almalinux.repo" ;;
|
"8") pidd_spr__file="/etc/yum.repos.d/almalinux.repo" ;;
|
||||||
"9") pidd_spr_file="/etc/yum.repos.d/almalinux-baseos.repo" ;;
|
"9") pidd_spr_file="/etc/yum.repos.d/almalinux-baseos.repo" ;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
pidd_sed "${pidd_spr__file}" \
|
pidd_sed "${pidd_spr__file}" \
|
||||||
"|^mirrorlist|# mirrorlist|" \
|
"|^mirrorlist|# mirrorlist|" \
|
||||||
"|${PIDD_URL_DEFAULT}|${PIDD_URL_CHOSEN}|" \
|
"|${PIDD_URL_DEFAULT}|${PIDD_URL_CHOSEN}|" \
|
||||||
"|^# baseurl|baseurl|"
|
"|^# baseurl|baseurl|"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_ALPINE}")
|
"${PIDD_OS_ALPINE}")
|
||||||
pidd_spr__file="/etc/apk/repositories"
|
pidd_spr__file="/etc/apk/repositories"
|
||||||
pidd_write "${pidd_spr__file}" "\
|
pidd_write "${pidd_spr__file}" "\
|
||||||
${PIDD_URL_CHOSEN}/v${PIDD_OS_VERSION}/main
|
${PIDD_URL_CHOSEN}/v${PIDD_OS_VERSION}/main
|
||||||
${PIDD_URL_CHOSEN}/v${PIDD_OS_VERSION}/community
|
${PIDD_URL_CHOSEN}/v${PIDD_OS_VERSION}/community
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_DEBIAN}")
|
"${PIDD_OS_DEBIAN}")
|
||||||
pidd_spr__file="/etc/apt/sources.list"
|
pidd_spr__file="/etc/apt/sources.list"
|
||||||
pidd_write "${pidd_spr__file}" "\
|
pidd_write "${pidd_spr__file}" "\
|
||||||
deb ${PIDD_URL_CHOSEN} ${PIDD_OS_VERSION} main
|
deb ${PIDD_URL_CHOSEN} ${PIDD_OS_VERSION} main
|
||||||
deb ${PIDD_URL_CHOSEN} ${PIDD_OS_VERSION}-backports main
|
deb ${PIDD_URL_CHOSEN} ${PIDD_OS_VERSION}-backports main
|
||||||
deb ${PIDD_URL_CHOSEN} ${PIDD_OS_VERSION}-updates main
|
deb ${PIDD_URL_CHOSEN} ${PIDD_OS_VERSION}-updates main
|
||||||
deb ${PIDD_URL_CHOSEN}-security ${PIDD_OS_VERSION}-security main
|
deb ${PIDD_URL_CHOSEN}-security ${PIDD_OS_VERSION}-security main
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_ROCKY}")
|
"${PIDD_OS_ROCKY}")
|
||||||
case "${PIDD_OS_VERSION}" in
|
case "${PIDD_OS_VERSION}" in
|
||||||
"8") pidd_spr__file="/etc/yum.repos.d/Rocky-BaseOS.repo" ;;
|
"8") pidd_spr__file="/etc/yum.repos.d/Rocky-BaseOS.repo" ;;
|
||||||
"9") pidd_spr__file="/etc/yum.repos.d/rocky.repo" ;;
|
"9") pidd_spr__file="/etc/yum.repos.d/rocky.repo" ;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
pidd_sed "${pidd_spr__file}" \
|
pidd_sed "${pidd_spr__file}" \
|
||||||
"|^mirrorlist|# mirrorlist|" \
|
"|^mirrorlist|# mirrorlist|" \
|
||||||
"|${PIDD_URL_DEFAULT}|${PIDD_URL_CHOSEN}|" \
|
"|${PIDD_URL_DEFAULT}|${PIDD_URL_CHOSEN}|" \
|
||||||
"|^#baseurl|baseurl|"
|
"|^#baseurl|baseurl|"
|
||||||
;;
|
;;
|
||||||
"${PIDD_OS_UBUNTU}")
|
"${PIDD_OS_UBUNTU}")
|
||||||
pidd_spr__file="/etc/apt/sources.list"
|
pidd_spr__file="/etc/apt/sources.list"
|
||||||
pidd_write "${pidd_spr__file}" "\
|
pidd_write "${pidd_spr__file}" "\
|
||||||
deb ${PIDD_URL_CHOSEN} ${PIDD_OS_VERSION} main
|
deb ${PIDD_URL_CHOSEN} ${PIDD_OS_VERSION} main
|
||||||
deb ${PIDD_URL_CHOSEN} ${PIDD_OS_VERSION}-backports main
|
deb ${PIDD_URL_CHOSEN} ${PIDD_OS_VERSION}-backports main
|
||||||
deb ${PIDD_URL_CHOSEN} ${PIDD_OS_VERSION}-updates main
|
deb ${PIDD_URL_CHOSEN} ${PIDD_OS_VERSION}-updates main
|
||||||
deb ${PIDD_URL_CHOSEN} ${PIDD_OS_VERSION}-security main
|
deb ${PIDD_URL_CHOSEN} ${PIDD_OS_VERSION}-security main
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -498,10 +498,10 @@ pidd_set_packages_configuration() {
|
||||||
pidd_step "Set packages configuration"
|
pidd_step "Set packages configuration"
|
||||||
pidd_write "${PIDD_PM_CONF_PATH}" "${PIDD_PM_CONF_TEXT}"
|
pidd_write "${PIDD_PM_CONF_PATH}" "${PIDD_PM_CONF_TEXT}"
|
||||||
case "${PIDD_OS_ID}" in
|
case "${PIDD_OS_ID}" in
|
||||||
"${PIDD_OS_DEBIAN}" | "${PIDD_OS_UBUNTU}")
|
"${PIDD_OS_DEBIAN}" | "${PIDD_OS_UBUNTU}")
|
||||||
export DEBIAN_FRONTEND="noninteractive"
|
export DEBIAN_FRONTEND="noninteractive"
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -607,9 +607,9 @@ pidd_install_python_modules() {
|
||||||
echo "→ ${pidd_ipm__root}"
|
echo "→ ${pidd_ipm__root}"
|
||||||
for pidd_ipm__repository in "${PIDD_GIT_MAIN}" "${PIDD_GIT_ROOT}"; do
|
for pidd_ipm__repository in "${PIDD_GIT_MAIN}" "${PIDD_GIT_ROOT}"; do
|
||||||
case "${pidd_ipm__repository}" in
|
case "${pidd_ipm__repository}" in
|
||||||
http*) pidd_ipm__url="${pidd_ipm__repository}" ;;
|
http*) pidd_ipm__url="${pidd_ipm__repository}" ;;
|
||||||
/*) pidd_ipm__url="${PIDD_PROJECT_ROOT}${pidd_ipm__repository}" ;;
|
/*) pidd_ipm__url="${PIDD_PROJECT_ROOT}${pidd_ipm__repository}" ;;
|
||||||
*) pidd_ipm__url="\
|
*) pidd_ipm__url="\
|
||||||
${PIDD_PROJECT_ROOT}/${PIDD_PROJECT_PATH}/${pidd_ipm__repository}" ;;
|
${PIDD_PROJECT_ROOT}/${PIDD_PROJECT_PATH}/${pidd_ipm__repository}" ;;
|
||||||
esac
|
esac
|
||||||
pidd_ipm__name="$(basename "${pidd_ipm__url}")"
|
pidd_ipm__name="$(basename "${pidd_ipm__url}")"
|
||||||
|
|
Loading…
Reference in a new issue