summaryrefslogtreecommitdiff
path: root/bin/pkg
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-05-29 21:39:40 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-05-29 21:39:40 +0200
commit227a66f617ac70625eb813a7281a6c2307d3c470 (patch)
treef608fd85857524913a961c799de07298af5a18dc /bin/pkg
parent2c8245123ef2f193b11c1238c4628d22366da39b (diff)
added 'info'
Diffstat (limited to 'bin/pkg')
-rwxr-xr-xbin/pkg14
1 files changed, 14 insertions, 0 deletions
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 ;;