diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-05-31 14:06:17 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-05-31 14:06:17 +0200 |
commit | a7884c93b59009915b4fc5921bef9c5c01216917 (patch) | |
tree | 987854dd1105115d8fba3d2493adbbfc580f4515 | |
parent | 5c612e9869d965c1bc6691c67cc76ed8b6f7a952 (diff) |
several
- rename .deps -> dependencies
- shwo package name on info
- show package priority on info
-rwxr-xr-x | bin/pkg | 25 |
1 files changed, 21 insertions, 4 deletions
@@ -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 } } |