From 92dfa8165ae534fcb3e00a64b552cc2772b7c921 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Wed, 10 Oct 2012 21:26:48 +0400 Subject: [PATCH] Updating gentoo-upgrade script if smart-live-rebuild available. --- sbin/gentoo-upgrade.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sbin/gentoo-upgrade.sh b/sbin/gentoo-upgrade.sh index a1ccce1..0d26426 100755 --- a/sbin/gentoo-upgrade.sh +++ b/sbin/gentoo-upgrade.sh @@ -69,6 +69,17 @@ if [ $STAGE_CNT -eq $STAGE ]; then fi let STAGE_CNT++ +# Update gentoo-upgrade script +if [ $STAGE_CNT -eq $STAGE ]; then + echo "======= STAGE $STAGE: Updating gentoo-upgrade script =======" + if [ `which smart-live-rebuild 2>/dev/null` ]; then + $NICE_CMD smart-live-rebuild app-admin/gentoo-upgrade + [ 0 -ne $? ] && echo "Stage $STAGE: Updating gentoo-upgrade script failed ;-( =======" && exit $STAGE + fi + + let STAGE++ +fi +let STAGE_CNT++ # sync portage tree if [ $STAGE_CNT -eq $STAGE ]; then