#!/bin/bash file="/var/www/files/localhost/`hostname`_updates.txt" dpfile="/var/www/files/localhost/`hostname`_depclean.txt" tty -s TTYTEST=$? ( \ ( \ ( \ emerge -uqDN @world @system --keep-going --with-bdeps=y && \ rm -f $file ) || \ /etc/portage/postsync.d/50-write-new-updates ) && \ emerge --depclean -q 2>&1 | tee $dpfile && \ emerge -q --keep-going @preserved-rebuild \ ) revdep-rebuild -q -i if [ $TTYTEST -eq 0 ]; then etc-update fi