From 227a66f617ac70625eb813a7281a6c2307d3c470 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 29 May 2008 21:39:40 +0200 Subject: added 'info' --- bin/pkg | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bin/pkg b/bin/pkg index dd06875..35e5946 100755 --- a/bin/pkg +++ b/bin/pkg @@ -171,12 +171,26 @@ pkg_status_wrapper () { } } +pkg_info () { + cd $PDIR/$1 || return + LOG=$(hg log) + info "Current version: " + echo $LOG | grep -m1 'changeset:' | grep -E -o '[0-9]{1,}:[0-9a-f]*' + info "Last update: " + echo $LOG | grep -m1 'date:' | grep -Eo '[A-Z][a-z]{2}.*' + if ([ -r .deps ]) { + info "Dependencies:\n" + cat .deps + } +} + check_sed case "$1" in add) pkg_add "$2" ;; changeroot) pkg_changesrc "$2" ;; delete) pkg_remove "$2" ;; + info) pkg_info "$2" ;; install) pkg_add "$2" ;; list) pkg_list_installed ;; list-all) pkg_list_available ;; -- cgit v1.2.3