diff options
author | D. Johnson <fenris02@fedoraproject.org> | 2012-07-19 11:42:54 -0500 |
---|---|---|
committer | D. Johnson <fenris02@fedoraproject.org> | 2012-07-19 11:42:54 -0500 |
commit | 570b067232c210a9ef267237f86ba12efd391462 (patch) | |
tree | 6bb11f127d16b04e8e9ac68fa8197b9dad0b3902 /show-leaves.sh | |
parent | f7020811c5bcdd25cc4282be18d005e7e44fcac2 (diff) | |
download | cleanup-570b067232c210a9ef267237f86ba12efd391462.tar.gz cleanup-570b067232c210a9ef267237f86ba12efd391462.tar.xz cleanup-570b067232c210a9ef267237f86ba12efd391462.zip |
Fix up show-installed to produce nicer output. Have a nicer exit message
with show-leaves. Apply upstream cosmetic bugfix in local show-installed.
Diffstat (limited to 'show-leaves.sh')
-rwxr-xr-x | show-leaves.sh | 14 |
1 files changed, 11 insertions, 3 deletions
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 |