summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-05-21 22:16:57 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-05-21 22:16:57 +0200
commit2a068c3de7f63ade2ea5249c784878a9da5126d6 (patch)
tree21b06653a6a69dd29a6e065a87877f80e59b3ce5
parent4201faa159fa3f81cfd4d1dbd1e8c76e81c9adda (diff)
bin/pkg: Added list-all to list all available packages
-rwxr-xr-xbin/pkg7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/pkg b/bin/pkg
index c1fe546..b11c1c4 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -102,6 +102,12 @@ pkg_list_installed () {
=ls -1 $PDIR
}
+pkg_list_available () {
+ if grep "^ssh" "$PKG_ROOT" &> /dev/null; then
+ ssh $(sed 's!^ssh://!!' <<< "$PKG_ROOT" | sed -r 's!^([^/]*)/.*$!\1!') 'ls -1'
+ fi
+}
+
pkg_status () {
cd $PDIR/$1
echo_status "Checking $1 status..."
@@ -124,6 +130,7 @@ case "$1" in
add) pkg_add "$2" ;;
changeroot) pkg_changesrc "$2" ;;
list) pkg_list_installed ;;
+ list-all) pkg_list_available ;;
remove) pkg_remove "$2" ;;
status) pkg_status_wrapper "$2" ;;
update) pkg_update_wrapper "$2" ;;