From a0b4c3ea39c329bb29ec098a854e7e00ddf63e73 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 29 Jun 2008 16:16:54 +0200 Subject: bin/pkg: Made local and remote updats accessible via CLI --- bin/pkg | 29 ++++++++++++++++++++--------- 1 file 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 -- cgit v1.2.3