From b0e22c5f037c2c09e2629770a7ae89c1cc1e8744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 11 Feb 2018 13:05:08 +0100 Subject: Make emergefix little but better and do revdev-rebuild --- sys-apps/personal-utils/files/emergefix | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'sys-apps/personal-utils/files') diff --git a/sys-apps/personal-utils/files/emergefix b/sys-apps/personal-utils/files/emergefix index abbc986..400df3c 100755 --- a/sys-apps/personal-utils/files/emergefix +++ b/sys-apps/personal-utils/files/emergefix @@ -1,2 +1,21 @@ #!/bin/sh -emerge -auDN --with-bdeps=y @world "$@" && emerge --depclean -a +set -e + +PRETEND=false +for arg in "$@"; do + case "$arg" in + -p) + PRETEND=true + ;; + esac +done + +echo -e '\e[1;34m========== Update packages ==========\e[0m' +emerge -auDN --with-bdeps=y @world "$@" + +if ! $PRETEND; then + echo -e '\e[1;34m========== Clean packages ==========\e[0m' + emerge --depclean -a + echo -e '\e[1;34m========== Rebuil packages ==========\e[0m' + revdep-rebuild +fi -- cgit v1.2.3