From d0856a923fd90a06b3883837c0b07864df54064b Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 30 Jun 2008 11:18:53 +0200 Subject: bin/pkg: Added lst_update_package to be called after installations/updates --- bin/pkg | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/pkg b/bin/pkg index 03e25fd..0057bc6 100755 --- a/bin/pkg +++ b/bin/pkg @@ -144,7 +144,7 @@ lst_incoming () { } vcs_log () { - [ -d .hg ] && {hg log | less ; return} + [ -d .hg ] && {hg glog | less ; return} [ -d .git ] && {git log ; return} } @@ -168,6 +168,13 @@ lst_update_local () { } } +lst_update_package () { + cd $PDIR + LIST=$(cat .list | grep -v ^"$1 ") + echo $LIST > .list + vcs_to_lst $1 >> .list +} + vcs_upgrade () { [ -d .hg ] && {hg pull --update ; return} [ -d .git ] && {git pull ; return} @@ -341,7 +348,7 @@ pkg_add () { cd $PDIR/$1 checklinks $CL_OPTIONS populate_collected "$1" - return 0 + lst_update_package $1 } pkg_remove () { @@ -376,6 +383,7 @@ pkg_upgrade () { exec_hook "$1" "post-update" checklinks $CL_OPTIONS populate_collected "$1" + lst_update_package $1 } else { clear_line } -- cgit v1.2.3