This commit is contained in:
Marc Beninca 2024-06-24 08:21:45 +02:00
parent 24312b41c5
commit 0ee67f04c1
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

28
pidd.sh
View file

@ -448,27 +448,25 @@ pidd_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") \ "8") pidd_spr__file="/etc/yum.repos.d/almalinux.repo" ;;
pidd_set_packages_repositories__file="/etc/yum.repos.d/almalinux.repo" ;; "9") pidd_spr_file="/etc/yum.repos.d/almalinux-baseos.repo" ;;
"9") \
pidd_set_packages_repositories__file="/etc/yum.repos.d/almalinux-baseos.repo" ;;
*) *)
esac esac
pidd_sed "${pidd_set_packages_repositories__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_set_packages_repositories__file="/etc/apk/repositories" pidd_spr__file="/etc/apk/repositories"
pidd_write "${pidd_set_packages_repositories__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_set_packages_repositories__file="/etc/apt/sources.list" pidd_spr__file="/etc/apt/sources.list"
pidd_write "${pidd_set_packages_repositories__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
@ -477,20 +475,18 @@ 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") \ "8") pidd_spr__file="/etc/yum.repos.d/Rocky-BaseOS.repo" ;;
pidd_set_packages_repositories__file="/etc/yum.repos.d/Rocky-BaseOS.repo" ;; "9") pidd_spr__file="/etc/yum.repos.d/rocky.repo" ;;
"9") \
pidd_set_packages_repositories__file="/etc/yum.repos.d/rocky.repo" ;;
*) *)
esac esac
pidd_sed "${pidd_set_packages_repositories__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_set_packages_repositories__file="/etc/apt/sources.list" pidd_spr__file="/etc/apt/sources.list"
pidd_write "${pidd_set_packages_repositories__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