#!/bin/sh set -e step() { echo -e '\e[1;34m==========' "$@" '==========\e[0m' } run() { "$@" || { echo -ne "\e[1;31mContinue?\e[0m " read } } ################################################################################# step "Update packages" run emerge -auDU --with-bdeps=y --keep-going @world "$@" step "Rebuil packages" run revdep-rebuild -- "$@" step "Rebuild preserved ones" run emerge --keep-going=y @preserved-rebuild step "Clean packages" run emerge --depclean -a "$@" step "Enable all fonts" enable_all_fonts() { eselect fontconfig list | \ awk ' $3 != "*" { print substr($1,2,length($1)-2) }' | \ while read -r font; do eselect fontconfig enable "$font" done } enable_all_fonts