summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-08-01 12:33:47 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-08-01 12:33:47 +0200
commit79bed00fe8633faa9d913c4f607d16e027eb45be (patch)
tree9eba9d3dd6aeb4a951510f161ce93d920e760bbe
parent50dc8212cb060162c028b0ee45bbb93410da8559 (diff)
bin/pkg: pkg_status: Only print status if something changed
-rwxr-xr-xbin/pkg11
1 files changed, 9 insertions, 2 deletions
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