summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-07-01 22:48:31 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-07-01 22:48:31 +0200
commit4c8c712ed656f20870d0363aae4cf4d46fa7c67a (patch)
tree155bd2545b11b9373df00a0360783c3f8e11e547
parent251603dba0e07ad807a75be0523e5573e0eb1eab (diff)
bin/pkg: Groupd lst_ / vcs_ functions together
-rwxr-xr-xbin/pkg23
1 files changed, 10 insertions, 13 deletions
diff --git a/bin/pkg b/bin/pkg
index 24e6a78..9224e6e 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -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
}