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