#!/bin/bashGOOD=$'\e[32;01m'NORMAL=$'\e[0m'currentpackage=1packages='x11-wm/compiz x11-libs/compiz-bcop x11-plugins/compiz-fusion-plugins-main x11-plugins/compiz-fusion-plugins-extra x11-plugins/compiz-fusion-plugins-unsupported x11-plugins/compiz-fusion-plugins-wallpaper x11-plugins/compiz-fusion-plugins-gears x11-plugins/compiz-fusion-plugins-threed x11-wm/emerald x11-themes/emerald-themes x11-libs/libcompizconfig dev-python/compizconfig-python x11-apps/ccsm x11-wm/compiz-fusion x11-apps/fusion-icon'total=0for p in $packages; do total=`echo "$total+1" | bc`donefor x in $packages; do buildcount=0 echo -e " ${GOOD}\0452${NORMAL} (${currentpackage} of ${total}) Building ${x}" emerge -v1 ${x} && buildcount=1 if [ "$buildcount" == "0" ] then echo -e " ${GOOD}\0452${NORMAL} (${currentpackage} of ${total}) Trying to build ${x} again" emerge -v1 ${x} && buildcount=1 fi if [ "$buildcount" == "0" ] then echo "Couldn't successfully build ${x}" broken="${broken}\n ${GOOD}\0452${NORMAL}${x}" fi currentpackage=`echo "$currentpackage+1" | bc`doneif [ -n "${broken}" ]then echo -e "These are the packages that are broken:${broken}" | lesselse echo -e "All packages built correctly."fi