Commit abe05351 authored by Bernhard Landauer's avatar Bernhard Landauer
Browse files

rebuild chroot if branch different

parent f3d6059e
......@@ -43,6 +43,7 @@ chroot_api_mount() {
set_branch() {
sed -i "/Branch =/c\Branch = $1" ${mirror_conf}
echo "Server = ${MIRROR}/$1/\$repo/\$arch" > "${CHROOT_DIR}/etc/pacman.d/mirrorlist"
echo $1 > ${CHROOT_DIR}/.branch
}
add_repo() {
......@@ -153,6 +154,10 @@ prepare_chroot() {
CLEAN=true
fi
fi
if [[ $(cat $1/.branch) != ${BRANCH} ]]; then
msg "Rebuilding chroot for branch [${BRANCH}]"
CLEAN=true
fi
if [[ "${CLEAN}" = "true" ]]; then
msg "Delete old chroot file system"
rm -rf $1/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment