summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-06-29 16:16:54 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-06-29 16:16:54 +0200
commita0b4c3ea39c329bb29ec098a854e7e00ddf63e73 (patch)
tree67b884cdf25660f0c813b49c05c38ebd40dd9bd1
parent99f4d7b40794107bae0ba4c1b9e8241cd5a98be7 (diff)
bin/pkg: Made local and remote updats accessible via CLI
-rwxr-xr-xbin/pkg29
1 files changed, 20 insertions, 9 deletions
diff --git a/bin/pkg b/bin/pkg
index b96ffea..af1d871 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -168,14 +168,6 @@ lst_update_full () {
}
}
-lst_update () {
- cd $PDIR
- info "Updating package list..."
- lst_update_remote
- lst_update_full
- clear_line
-}
-
vcs_upgrade () {
[ -d .hg ] && {hg pull --update ; return}
[ -d .git ] && {git pull ; return}
@@ -440,6 +432,23 @@ pkg_status_wrapper () {
}
}
+pkg_update () {
+ cd $PDIR
+ info "Updating package list..."
+ lst_update_remote
+ lst_update_full
+ clear_line
+}
+
+pkg_update_remote () {
+ cd $PDIR
+ lst_update_remote
+}
+
+pkg_update_local () {
+ lst_update_full
+}
+
# Various information related to a package
pkg_info () {
cd $PDIR
@@ -527,10 +536,12 @@ case "$1" in
install) pkg_add "$2" "$3" ;;
list) pkg_list_installed ;;
list-all) pkg_list_available ;;
+ local-update) pkg_update_local ;;
log) pkg_log "$2" ;;
+ remote-update) pkg_update_remote ;;
remove) pkg_remove "$2" ;;
status) pkg_status_wrapper "$2" ;;
- update) lst_update ;;
+ update) pkg_update ;;
upgrade) pkg_upgrade_wrapper "$2" ;;
*) die "wait, what?\n" ;;
esac