[util] add copy keyring/mirrorlist

This commit is contained in:
udeved 2015-06-03 16:09:26 +02:00
parent 3a51ccc287
commit 55e2e73723

View file

@ -227,40 +227,14 @@ clean_pacman_conf(){
msg "Done cleaning [$1/etc/pacman.conf]" msg "Done cleaning [$1/etc/pacman.conf]"
} }
get_branch(){ copy_mirrorlist(){
source /etc/pacman-mirrors.conf cp -a /etc/pacman.d/mirrorlist "$1/etc/pacman.d/"
msg3 "Host branch: ${Branch}"
echo "$Branch"
} }
set_branch(){ copy_keyring(){
msg3 "Setting branch for ${branch} build" if [[ -d /etc/pacman.d/gnupg ]] && [[ ! -d $1/etc/pacman.d/gnupg ]]; then
pacman-mirrors -g -b $1 cp -a /etc/pacman.d/gnupg "$1/etc/pacman.d/"
} fi
reset_branch(){
pacman-mirrors -g
}
initialize_branch(){
[[ $(get_branch) != ${branch} ]] && set_branch "${branch}"
# local repositories=$(get_repos) pattern='Include = /etc/pacman.d/mirrorlist' url=
# msg "Initializing ${branch} ($1) ..."
# for repo in ${repositories[@]}; do
# case ${repo} in
# 'core'|extra|community|multilib)
# url=${build_mirror}/${branch}/${repo}/${arch}
# msg2 "Setting [${repo}]: Server = ${url}"
# sed -i "s|^.*/$repo/.*|Server = $url|" -i $1
# ;;
# *) continue ;;
# esac
# done
}
reset_pacman_conf(){
msg "Include mirrorlist ($1)"
sed "s|^.*${build_mirror}.*|Include = /etc/pacman.d/mirrorlist|g" -i $1
} }
load_vars() { load_vars() {