summaryrefslogtreecommitdiff
path: root/bin/pkg
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-05-31 14:06:17 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-05-31 14:06:17 +0200
commita7884c93b59009915b4fc5921bef9c5c01216917 (patch)
tree987854dd1105115d8fba3d2493adbbfc580f4515 /bin/pkg
parent5c612e9869d965c1bc6691c67cc76ed8b6f7a952 (diff)
several
- rename .deps -> dependencies - shwo package name on info - show package priority on info
Diffstat (limited to 'bin/pkg')
-rwxr-xr-xbin/pkg25
1 files changed, 21 insertions, 4 deletions
diff --git a/bin/pkg b/bin/pkg
index b61c3e0..49e7eb6 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -43,8 +43,8 @@ if ([ ! -d $PDIR ]) {
}
check_deps () {
- [ -r $PDIR/$1/.deps ] || return 0
- DEPS=($(cat $PDIR/$1/.deps))
+ [ -r $PDIR/$1/dependencies ] || return 0
+ DEPS=($(cat $PDIR/$1/dependencies))
INSTALL=()
for dep in $DEPS; {
if ([ "$dep" = "$1" ]) {
@@ -171,8 +171,24 @@ pkg_status_wrapper () {
}
}
+real_priority () {
+ case "$1" in
+ 6) echo "essential" ;;
+ 5) echo "important" ;;
+ 4) echo "required" ;;
+ 3) echo "standard" ;;
+ 2) echo "optional" ;;
+ 1) echo "extra" ;;
+ *) echo "?" ;;
+ esac
+}
+
pkg_info () {
cd $PDIR/$1 || return
+ info "Package: "
+ echo "$1"
+ info "Priority: "
+ real_priority $(cat priority 2> /dev/null || echo 0)
LOG=$(hg log)
info "Current version: "
echo $LOG | grep -m1 'changeset:' | grep -E -o '[0-9]{1,}:[0-9a-f]*'
@@ -184,9 +200,10 @@ pkg_info () {
info "Hooks: "
ls hooks
}
- if ([ -r .deps ]) {
+ if ([ -r dependencies ]) {
info "Dependencies:\n"
- cat .deps
+ cat dependencies | tr "\n" " "
+ echo
}
}