diff options
Diffstat (limited to 'sys-apps/personal-utils/files/emergefix')
-rwxr-xr-x | sys-apps/personal-utils/files/emergefix | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/sys-apps/personal-utils/files/emergefix b/sys-apps/personal-utils/files/emergefix index 2a3a3b0..d621173 100755 --- a/sys-apps/personal-utils/files/emergefix +++ b/sys-apps/personal-utils/files/emergefix @@ -1,25 +1,37 @@ #!/bin/sh set -e -fail_ask() { - echo -ne "\e[1;31mContinue?\e[0m " - read +step() { + echo -e '\e[1;34m==========' "$@" '==========\e[0m' } -get_perl_version() { - equery list -F '$version' dev-lang/perl +run() { + "$@" || { + echo -ne "\e[1;31mContinue?\e[0m " + read + } } ################################################################################# -echo -e '\e[1;34m========== Update packages ==========\e[0m' -emerge -auDU --with-bdeps=y --keep-going @world "$@" || fail_ask +step "Update packages" +run emerge -auDU --with-bdeps=y --keep-going @world "$@" -echo -e '\e[1;34m========== Rebuil packages ==========\e[0m' -revdep-rebuild -- "$@" || fail_ask +step "Rebuil packages" +run revdep-rebuild -- "$@" -echo -e '\e[1;34m========== Rebuild preserved ones ==========\e[0m' -emerge --keep-going=y @preserved-rebuild || fail_ask +step "Rebuild preserved ones" +run emerge --keep-going=y @preserved-rebuild -echo -e '\e[1;34m========== Clean packages ==========\e[0m' -emerge --depclean -a "$@" +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 |