summaryrefslogtreecommitdiff
path: root/bin/pkg
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-04-04 21:56:55 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-04-04 21:56:55 +0200
commitf66d76f4414111f79dc73eb0f8b76f12741b4b81 (patch)
tree5062748fa68cfdd8e7ec14d89b955d2fde45aa82 /bin/pkg
parente2c5a8853828f2b4eed53b4cbd77ddcce39412ed (diff)
pkg: pkg_list: Also list not-installed packages, depending on argument
Diffstat (limited to 'bin/pkg')
-rwxr-xr-xbin/pkg19
1 files changed, 15 insertions, 4 deletions
diff --git a/bin/pkg b/bin/pkg
index 965af60..55f493d 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -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)