From f986b05dee02cefdfc78224a140ad57785f01083 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Sun, 13 Jan 2013 16:39:32 +0400 Subject: [PATCH] Upgrade perl/haskell only if installed. --- sbin/gentoo-upgrade.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sbin/gentoo-upgrade.sh b/sbin/gentoo-upgrade.sh index 7808df5..ceef559 100755 --- a/sbin/gentoo-upgrade.sh +++ b/sbin/gentoo-upgrade.sh @@ -328,12 +328,14 @@ if [ $STAGE_CNT -eq $STAGE ]; then fi echo 'Test and remember if we should run perl-cleaner after @system upgrade' - if [ 0 -ne `emerge -uNp dev-lang/perl 2>&1 | grep '^\[' | wc -l` ]; then + if [[ 0 -ne `qlist -IC dev-lang/perl | wc -l` + && 0 -ne `emerge -uNp dev-lang/perl 2>&1 | grep '^\[' | wc -l` ]]; then touch /etc/portage/need_upgrade_perl fi echo 'Test and remember if we should run haskell-updater after @system upgrade' - if [ 0 -ne `emerge -uNp dev-lang/ghc 2>&1 | grep '^\[' | wc -l` ]; then + if [[ 0 -ne `qlist -IC dev-lang/ghc | wc -l` + && 0 -ne `emerge -uNp dev-lang/ghc 2>&1 | grep '^\[' | wc -l` ]]; then touch /etc/portage/need_upgrade_haskell fi