From 9fc6619dd30c949dc7636ee307c5209cc8ff6e1b Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 24 Jun 2008 22:48:08 +0200 Subject: bin/pkg: Fixed pkg_log, nicer style --- bin/pkg | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/pkg b/bin/pkg index 58a4c61..5992229 100755 --- a/bin/pkg +++ b/bin/pkg @@ -127,15 +127,18 @@ vcs_add () { } vcs_incoming () { - # [ -d .vcs ] && vcs incoming will not work here, since the [] will return - # something. We need the return value of vcs. [ -d .hg ] && {hg --quiet incoming; return} [ -d .git ] && {true ; return} } +vcs_log () { + [ -d .hg ] && {hg log | less ; return} + [ -d .git ] && {git log ; return} +} + vcs_update () { - [ -d .hg ] && hg pull --update - [ -d .git ] && git pull + [ -d .hg ] && {hg pull --update ; return} + [ -d .git ] && {git pull ; return} } @@ -454,7 +457,8 @@ pkg_info () { pkg_log () { check_installed "$1" - hg -R $PDIR/$1 glog | less + cd $PDIR/$1 + vcs_log } pkg_changelog () { -- cgit v1.2.3