diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-05-21 17:44:50 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-05-21 17:44:50 +0200 |
commit | d79ed915438d57432a715f7df3a9b9e94533aee6 (patch) | |
tree | 00e69ba9523c3a9536e90c00d65c6ccbfd3565fb /bin/pkg | |
parent | 6dda4ac1a71364e532c280233a0a49c87abcf179 (diff) |
bin/pkg: Added 'status' to show whether a package contains local modifications or has unmet dependencies
Diffstat (limited to 'bin/pkg')
-rwxr-xr-x | bin/pkg | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -4,6 +4,7 @@ PKG_ROOT="ssh://derf.homelinux.org/packages" VCS_CMD="hg" VCS_OPTIONS="--quiet" VCS_ADD="clone" +VCS_STATUS="status" VCS_UPDATE="pull" VCS_UPDATE_OPTIONS="--update" CL_OPTIONS="-q" @@ -68,7 +69,6 @@ pkg_remove () { pkg_update () { cd $PDIR/$1 echo_status "Updating package $1" - check_deps $1 $VCS_CMD $VCS_OPTIONS $VCS_UPDATE $VCS_UPDATE_OPTIONS checklinks $CL_OPTIONS if [ -f hooks/post-update ]; then @@ -102,10 +102,29 @@ pkg_list_installed () { =ls -1 $PDIR } +pkg_status () { + cd $PDIR/$1 + echo_status "Checking $1 status..." + check_deps $1 + $VCS_CMD $VCS_STATUS +} + +pkg_status_wrapper () { + if [ -n "$1" ]; then + pkg_status "$1" + else + cd $PDIR + for i in *(/); { + pkg_status "$i" + } + fi +} + case "$1" in add) pkg_add "$2" ;; changeroot) pkg_changesrc "$2" ;; list) pkg_list_installed ;; remove) pkg_remove "$2" ;; + status) pkg_status_wrapper "$2" ;; update) pkg_update_wrapper "$2" ;; esac |