From 8673d15831c410e0e6cd0f76afc287e610971b2d Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Wed, 10 Oct 2012 20:58:04 +0400 Subject: [PATCH] Automatic pull remote changes for Portage config. --- sbin/gentoo-upgrade.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sbin/gentoo-upgrade.sh b/sbin/gentoo-upgrade.sh index a40c405..5f32a1d 100755 --- a/sbin/gentoo-upgrade.sh +++ b/sbin/gentoo-upgrade.sh @@ -59,6 +59,17 @@ if [ $STAGE_CNT -eq $STAGE ]; then fi let STAGE_CNT++ +# Pull portage config changes +if [ $STAGE_CNT -eq $STAGE ]; then + echo "======= STAGE $STAGE: pull portage config changes =======" + [ -d /etc/portage/.git ] && cd /etc/portage && git pull + [ 0 -ne $? ] && echo "Stage $STAGE: cd /etc/portage && git pull failed ;-( =======" && exit $STAGE + + let STAGE++ +fi +let STAGE_CNT++ + + # sync portage tree if [ $STAGE_CNT -eq $STAGE ]; then echo "======= STAGE $STAGE: sync portage tree ======="