Move the code to update symlinks to a separate function, call it from pre_build and after each set build.

Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>
This commit is contained in:
Jorge Manuel B. S. Vicetto (jmbsvicetto) 2016-05-05 10:07:20 +00:00
parent a77a4ebce5
commit bac6e3a2d7
2 changed files with 17 additions and 6 deletions

View file

@ -59,11 +59,7 @@ give_latest_from_dates() {
tr '~' '-'
}
pre_build() {
pushd ${REPO_DIR}
git pull
popd
update_symlinks() {
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/{default,hardened} ; do
pushd $d
@ -76,6 +72,13 @@ pre_build() {
done
}
pre_build() {
pushd ${REPO_DIR}
git pull
popd
update_symlinks
}
post_build() {
pushd ${BUILD_SRCDIR_BASE}/default
mkdir -p ${BUILD_DESTDIR_BASE}