forked from mirrored-repos/manjaro-tools
chroot-run: fix getting Branch from pacman-mirrors.conf
This commit is contained in:
parent
4235a98bbf
commit
585ac8fd4a
2 changed files with 4 additions and 4 deletions
|
@ -83,13 +83,13 @@ copy_hostconf () {
|
|||
if [[ -n ${build_mirror} ]];then
|
||||
build_mirror=${build_mirror}'/$repo/$arch'
|
||||
if ${keep_mirrors}; then
|
||||
source $1/etc/pacman-mirrors.conf
|
||||
Branch=$(cat "$1/etc/pacman-mirrors.conf" | grep '^Branch = ' | sed 's/Branch = \s*//g')
|
||||
sed -e "s|/stable|/${Branch}|g" -i "$1/etc/pacman.d/mirrorlist"
|
||||
else
|
||||
echo "Server = ${build_mirror}" > "$1/etc/pacman.d/mirrorlist"
|
||||
fi
|
||||
else
|
||||
source $1/etc/pacman-mirrors.conf
|
||||
Branch=$(cat "$1/etc/pacman-mirrors.conf" | grep '^Branch = ' | sed 's/Branch = \s*//g')
|
||||
sed -e "s|/stable|/${Branch}|g" -i "$1/etc/pacman.d/mirrorlist"
|
||||
fi
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
##
|
||||
|
||||
## Branch Pacman should use (stable, testing, unstable)
|
||||
# Branch = stable
|
||||
Branch = stable
|
||||
|
||||
## Generation method
|
||||
## 1) rank - rank mirrors depending on their access time
|
||||
|
@ -25,4 +25,4 @@
|
|||
## pacman-mirrors is invoked with the --no-update argument.
|
||||
## Useful if you don't want the mirrorlist regenerated after a
|
||||
## pacman-mirrors package upgrade.
|
||||
# NoUpdate = False
|
||||
# NoUpdate = False
|
||||
|
|
Loading…
Reference in a new issue