From 570b067232c210a9ef267237f86ba12efd391462 Mon Sep 17 00:00:00 2001 From: "D. Johnson" Date: Thu, 19 Jul 2012 11:42:54 -0500 Subject: Fix up show-installed to produce nicer output. Have a nicer exit message with show-leaves. Apply upstream cosmetic bugfix in local show-installed. --- show-leaves.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'show-leaves.sh') diff --git a/show-leaves.sh b/show-leaves.sh index f3f155e..7b0af01 100755 --- a/show-leaves.sh +++ b/show-leaves.sh @@ -22,9 +22,17 @@ repoquery --installed --qf "%{nvra} - %{yumdb_info.reason}" \ |while read n a a; do \ echo remove $n done > $YSHELL -echo "run" >> $YSHELL -echo "To remove auto-detected leaf packages: yum shell $YSHELL" -cat $YSHELL +if [ -s $YSHELL ]; then + echo "Leaf packages:" + cat $YSHELL + + echo "" + echo "run" >> $YSHELL + echo "To remove auto-detected leaf packages: yum shell $YSHELL" +else + rm $YSHELL + echo "No leaf packages detected." +fi #EOF -- cgit