From e9150b18929bd720dd8243f482ac810fbcac3a04 Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Tue, 3 Oct 2017 11:08:25 +0200 Subject: [PATCH] Add specific updates to extinfo field. --- plugins/other/pacman_pending_updates | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/other/pacman_pending_updates b/plugins/other/pacman_pending_updates index ed3b8e26..c6fda9bb 100755 --- a/plugins/other/pacman_pending_updates +++ b/plugins/other/pacman_pending_updates @@ -31,7 +31,7 @@ This plugin will draw one line: the number of updates pending. =head1 VERSION - 1.0.0 + 1.1.0 =head1 AUTHOR @@ -63,7 +63,13 @@ EOM ;; *) - echo updates.value $(checkupdates | wc -l) + tmpfile=$(mktemp) + updates=$(checkupdates | tee "$tmpfile" | wc -l) + echo updates.value $updates + if [ $updates -gt 0 ]; then + echo updates.extinfo $(paste -s -d, "$tmpfile") + fi + rm "$tmpfile" ;; esac