From 79bed00fe8633faa9d913c4f607d16e027eb45be Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 1 Aug 2008 12:33:47 +0200 Subject: bin/pkg: pkg_status: Only print status if something changed --- bin/pkg | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'bin/pkg') diff --git a/bin/pkg b/bin/pkg index a90dba3..f6cebfb 100755 --- a/bin/pkg +++ b/bin/pkg @@ -471,8 +471,15 @@ pkg_list_available () { pkg_status () { check_installed $1 cd $PDIR/$1 - info "$1:\n" - PAGER='' vcs_status $1 + info "Checking status: $1" + vcs_status=$(PAGER='' vcs_status $1) + if [[ -n $vcs_status && $(echo $vcs_status | tail -n 1) != 'nothing to commit (working directory clean)' ]] { + clear_line + info "$1:\n" + echo $vcs_status + } else { + clear_line + } } # Same as with update - if no package is specified, check all -- cgit v1.2.3