diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-07-08 14:44:36 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-07-08 14:44:36 +0200 |
commit | ccb037b8c262453bbea7437f116ecb4b03bff1c8 (patch) | |
tree | a3e7c3b569dff0e976ba8df6cd1dd752d8e2674a /bin | |
parent | 8a17e253b884d483269688d66de3a8d2ccde0cf3 (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-x | bin/pkg | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |