From 7573b38ca8efe4c37db94e35ea07fa28e0ea3e44 Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 1 Jun 2015 21:19:28 +0200 Subject: [PATCH] [util] add set_core_branch() --- lib/util.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/util.sh b/lib/util.sh index b30f8a4..86d37fa 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -229,10 +229,15 @@ clean_pacman_conf(){ fix_pacman_conf(){ msg "Fixing $1/etc/pacman.conf [core] ..." - sed -i "/^.Server.*/d" $1/etc/pacman.conf + sed -i "/^.Server = http://mirror.*/d" $1/etc/pacman.conf sed -i '/#Include.*/s/^#//' $1/etc/pacman.conf } +set_core_branch(){ + msg "Setting [core] Server branch ($1)" + sed -i "s|^.*%branch%.*|${branch}" $1 +} + load_vars() { local var