diff options
-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 } } |