diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-04-04 21:56:55 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-04-04 21:56:55 +0200 |
commit | f66d76f4414111f79dc73eb0f8b76f12741b4b81 (patch) | |
tree | 5062748fa68cfdd8e7ec14d89b955d2fde45aa82 /bin/pkg | |
parent | e2c5a8853828f2b4eed53b4cbd77ddcce39412ed (diff) |
pkg: pkg_list: Also list not-installed packages, depending on argument
Diffstat (limited to 'bin/pkg')
-rwxr-xr-x | bin/pkg | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -706,8 +706,20 @@ function pkg_upgrade { fi } -function pkg_list_installed { - cut -d ' ' -f 1 $PDIR/.list +function pkg_list { + case $1 in + ''|local) + cut -d ' ' -f 1 $PDIR/.list + ;; + all|remote) + cut -d ' ' -f 1 $PDIR/.list-remote + ;; + not-installed) + while read package crap; do + grep "^$package" $PDIR/.list &> /dev/null || echo $package + done < $PDIR/.list-remote + ;; + esac } function pkg_list_available { @@ -833,8 +845,7 @@ case $action in delete) pkg_remove $* ;; info) pkg_info $* ;; install) pkg_add $* ;; - list) pkg_list_installed $* ;; - list-all) pkg_list_available $* ;; + list) pkg_list $* ;; local-update) pkg_update_local $* ;; log) pkg_log $* ;; push) |