diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-08-01 12:33:47 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-08-01 12:33:47 +0200 |
commit | 79bed00fe8633faa9d913c4f607d16e027eb45be (patch) | |
tree | 9eba9d3dd6aeb4a951510f161ce93d920e760bbe /bin | |
parent | 50dc8212cb060162c028b0ee45bbb93410da8559 (diff) |
bin/pkg: pkg_status: Only print status if something changed
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pkg | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 |