cd_set_packages_repositories
This commit is contained in:
parent
d2f060b6a1
commit
3c16e68d91
1 changed files with 16 additions and 13 deletions
29
cd.sh
29
cd.sh
|
@ -377,29 +377,30 @@ Acquire::https::Verify-Peer False;
|
|||
}
|
||||
|
||||
cd_set_packages_repositories () {
|
||||
local file
|
||||
cd_step "Set packages repositories"
|
||||
case "${CD_OS_ID}" in
|
||||
"${CD_OS_ALMA}")
|
||||
case "${CD_OS_VERSION}" in
|
||||
"8") file="/etc/yum.repos.d/almalinux.repo" ;;
|
||||
"9") file="/etc/yum.repos.d/almalinux-baseos.repo" ;;
|
||||
"8") \
|
||||
cd_set_packages_repositories__file="/etc/yum.repos.d/almalinux.repo" ;;
|
||||
"9") \
|
||||
cd_set_packages_repositories__file="/etc/yum.repos.d/almalinux-baseos.repo" ;;
|
||||
esac
|
||||
cd_sed "${file}" \
|
||||
cd_sed "${cd_set_packages_repositories__file}" \
|
||||
"|^mirrorlist|# mirrorlist|" \
|
||||
"|${CD_URL_DEFAULT}|${CD_URL_CHOSEN}|" \
|
||||
"|^# baseurl|baseurl|"
|
||||
;;
|
||||
"${CD_OS_ALPINE}")
|
||||
file="/etc/apk/repositories"
|
||||
cd_write "${file}" "\
|
||||
cd_set_packages_repositories__file="/etc/apk/repositories"
|
||||
cd_write "${cd_set_packages_repositories__file}" "\
|
||||
${CD_URL_CHOSEN}/v${CD_OS_VERSION}/main
|
||||
${CD_URL_CHOSEN}/v${CD_OS_VERSION}/community
|
||||
"
|
||||
;;
|
||||
"${CD_OS_DEBIAN}")
|
||||
file="/etc/apt/sources.list"
|
||||
cd_write "${file}" "\
|
||||
cd_set_packages_repositories__file="/etc/apt/sources.list"
|
||||
cd_write "${cd_set_packages_repositories__file}" "\
|
||||
deb ${CD_URL_CHOSEN} ${CD_OS_VERSION} main
|
||||
deb ${CD_URL_CHOSEN} ${CD_OS_VERSION}-backports main
|
||||
deb ${CD_URL_CHOSEN} ${CD_OS_VERSION}-updates main
|
||||
|
@ -408,17 +409,19 @@ deb ${CD_URL_CHOSEN}-security ${CD_OS_VERSION}-security main
|
|||
;;
|
||||
"${CD_OS_ROCKY}")
|
||||
case "${CD_OS_VERSION}" in
|
||||
"8") file="/etc/yum.repos.d/Rocky-BaseOS.repo" ;;
|
||||
"9") file="/etc/yum.repos.d/rocky.repo" ;;
|
||||
"8") \
|
||||
cd_set_packages_repositories__file="/etc/yum.repos.d/Rocky-BaseOS.repo" ;;
|
||||
"9") \
|
||||
cd_set_packages_repositories__file="/etc/yum.repos.d/rocky.repo" ;;
|
||||
esac
|
||||
cd_sed "${file}" \
|
||||
cd_sed "${cd_set_packages_repositories__file}" \
|
||||
"|^mirrorlist|# mirrorlist|" \
|
||||
"|${CD_URL_DEFAULT}|${CD_URL_CHOSEN}|" \
|
||||
"|^#baseurl|baseurl|"
|
||||
;;
|
||||
"${CD_OS_UBUNTU}")
|
||||
file="/etc/apt/sources.list"
|
||||
cd_write "${file}" "\
|
||||
cd_set_packages_repositories__file="/etc/apt/sources.list"
|
||||
cd_write "${cd_set_packages_repositories__file}" "\
|
||||
deb ${CD_URL_CHOSEN} ${CD_OS_VERSION} main
|
||||
deb ${CD_URL_CHOSEN} ${CD_OS_VERSION}-backports main
|
||||
deb ${CD_URL_CHOSEN} ${CD_OS_VERSION}-updates main
|
||||
|
|
Loading…
Reference in a new issue