diff options
-rwxr-xr-x | bin/pkg | 23 |
1 files changed, 10 insertions, 13 deletions
@@ -114,12 +114,8 @@ confirm_no () { ## ## Major internal functions ## -## Naming: -## vcs_ do something by accessing the package -## lst_ do something by accessing the list ## VCS Wrappers - vcs_to_lst () { if [[ -d $1/.hg ]] { echo -n "$1 hg " @@ -139,15 +135,21 @@ vcs_add () { esac } -lst_incoming () { - [ "$(lst_local_version $1)" != "$(lst_remote_version $1)" ] -} - vcs_log () { [[ -d .hg ]] && {hg glog | less ; return} [[ -d .git ]] && {git log ; return} } +vcs_upgrade () { + [[ -d .hg ]] && {hg pull --update ; return} + [[ -d .git ]] && {git pull ; return} +} + +## List stuff +lst_incoming () { + [ "$(lst_local_version $1)" != "$(lst_remote_version $1)" ] +} + lst_type () { grep ^"$1 " $PDIR/.list-remote | cut -d ' ' -f 2 } @@ -181,11 +183,6 @@ lst_remove_package () { echo $LIST > .list } -vcs_upgrade () { - [[ -d .hg ]] && {hg pull --update ; return} - [[ -d .git ]] && {git pull ; return} -} - lst_local_version () { grep ^"$1 " $PDIR/.list | cut -d ' ' -f 3 } |