From 0f5b40ce367269f6ad4dc327bbecc02011a1e2d6 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Sat, 13 Oct 2012 23:00:01 +0400 Subject: [PATCH] Do not break the update if /etc/portage/.git not present. --- sbin/gentoo-upgrade.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sbin/gentoo-upgrade.sh b/sbin/gentoo-upgrade.sh index dc81818..69720df 100755 --- a/sbin/gentoo-upgrade.sh +++ b/sbin/gentoo-upgrade.sh @@ -61,9 +61,11 @@ 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 + if [ -d /etc/portage/.git ]; then + echo "======= STAGE $STAGE: pull portage config changes =======" + cd /etc/portage && git pull + [ 0 -ne $? ] && echo "Stage $STAGE: cd /etc/portage && git pull failed ;-( =======" && exit $STAGE + fi let STAGE++ fi