summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-05-31 14:19:53 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-05-31 14:19:53 +0200
commit4437010fd889fd3228362afdc164de3df798f2a3 (patch)
treef2abc61705da4157f6bb3df8bcf158ebb6d6de5d
parent856ed576cbcff12da98912cab4f4b984649e51e1 (diff)
more info
-rwxr-xr-xbin/pkg26
1 files changed, 17 insertions, 9 deletions
diff --git a/bin/pkg b/bin/pkg
index 49e7eb6..133d055 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -179,7 +179,7 @@ real_priority () {
3) echo "standard" ;;
2) echo "optional" ;;
1) echo "extra" ;;
- *) echo "?" ;;
+ *) echo ;;
esac
}
@@ -190,20 +190,28 @@ pkg_info () {
info "Priority: "
real_priority $(cat priority 2> /dev/null || echo 0)
LOG=$(hg log)
- info "Current version: "
+ info "Version: "
echo $LOG | grep -m1 'changeset:' | grep -E -o '[0-9]{1,}:[0-9a-f]*'
- info "Last update: "
+ info "Date: "
echo $LOG | grep -m1 'date:' | grep -Eo '[A-Z][a-z]{2}.*'
- info "repo size: "
- du -sh .hg | grep -o '.*[KMG]'
+ if ([ -r dependencies ]) {
+ info "Depends: "
+ cat dependencies | tr "\n" " " | sed 's/ /, /g'
+ echo
+ }
+ if ([ -r tags ]) {
+ info "Tags: "
+ cat tags | tr "\n" " " | sed 's/ /, /g'
+ }
if ([ -d hooks ]) {
info "Hooks: "
ls hooks
}
- if ([ -r dependencies ]) {
- info "Dependencies:\n"
- cat dependencies | tr "\n" " "
- echo
+ info "Repository size: "
+ du -sh .hg | grep -o '.*[KMG]'
+ if ([ -r description ]) {
+ info "Description:\n"
+ cat description
}
}