#!/bin/bash [ -s "$PORTAGE_TMPDIR" ] && exec -c /bin/bash -l -c $0 EMERGEEXTRAOPTS=$(portageq envvar EMERGEEXTRAOPTS) UPDATESTATEDIR=$(portageq envvar UPDATESTATEDIR) updates="${UPDATESTATEDIR:-/tmp}/`hostname`_updates.txt" depcleans="${UPDATESTATEDIR:-/tmp}/`hostname`_depclean.txt" tty -s TTYTEST=$? ( \ ( \ ( \ emerge -uqDN @world @system --keep-going --with-bdeps=y ${EMERGEEXTRAOPTS} && \ rm -f ${updates} ) || \ /etc/portage/postsync.d/50-write-new-updates ) && \ emerge --depclean -q 2>&1 | tee ${depcleans} && \ emerge -q --keep-going @preserved-rebuild ${EMERGEEXTRAOPTS} \ ) /usr/sbin/etc-update --preen if [ $TTYTEST -eq 0 ]; then /usr/sbin/etc-update fi