summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-07-08 14:44:36 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-07-08 14:44:36 +0200
commitccb037b8c262453bbea7437f116ecb4b03bff1c8 (patch)
treea3e7c3b569dff0e976ba8df6cd1dd752d8e2674a /bin
parent8a17e253b884d483269688d66de3a8d2ccde0cf3 (diff)
pkg: Added PKGLIST_LOCAL setting
With this, it is possibly to execute a local pkglist script. This way, the package list can be retrieved by almost any possible means
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pkg7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/pkg b/bin/pkg
index ac5060b..d3c9d94 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -77,6 +77,7 @@ shift
[[ -n $PKG_ROOT ]] || die "No PKG_ROOT specified. Please edit your pkg.conf\n"
: ${PKG_DIR:="$HOME/packages"}
+: ${PKGLIST_LOCAL=0}
: ${CL_OPTIONS:=--quiet}
: ${SILENT=0}
: ${DEBUG=0}
@@ -346,10 +347,10 @@ function list_update_remote {
typeset tmpfile=$(mktemp -t pkglist.XXXXXX)
typeset -i ret=0
export PKG_DIR
- if [[ $PKG_PROTO == 'ssh' ]] {
- ssh $PKG_USER@$PKG_HOST "PKG_DIR='$PKG_DIR' $PKGLIST_PATH $PKG_PATH" > $tmpfile
- } elif [[ $PKG_PROTO == 'file' ]] {
+ if [[ $PKGLIST_LOCAL == 1 || $PKG_PROTO == 'file' ]] {
$PKGLIST_PATH $PKG_PATH > $tmpfile
+ } elif [[ $PKG_PROTO == 'ssh' ]] {
+ ssh $PKG_USER@$PKG_HOST "PKG_DIR='$PKG_DIR' $PKGLIST_PATH $PKG_PATH" > $tmpfile
}
if [[ -n $(cat $tmpfile) ]] {
cp $tmpfile .list-remote