diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-10-08 19:00:06 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-10-08 19:00:06 +0200 |
commit | df6c03ef6b8e5ccda7e9c42c99fc4e71bb5a23d5 (patch) | |
tree | 7998f9114bb8f271b21ed9349d6488bfb963c3d5 /bin | |
parent | 1f92f8a22febba8f100f458f7f91321768a253f8 (diff) |
Add on-demand update of remote list. Caution: Not yet 100% tested
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pkg | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -1,6 +1,5 @@ #!/usr/bin/env zsh # pkg - /home package manager and zsh playground - typeset -a -U triggers ## @@ -199,9 +198,17 @@ list_type_local () { list_update_remote () { if [[ $PKG_PROTO = 'ssh' ]] { - scp -q $PKG_HOST:$PKG_PATH/.list .list-remote + ssh $PKG_HOST "$PKG_PATH/core/include/pkglist $PKG_PATH" > .list-remote + if (( newmode == 0 )) { + scp -q $PKG_HOST:$PKG_PATH/.list .list-remote + warn "The pkglist version on your packages_root is outdated, please update\n" + } } elif [[ $PKG_PROTO = 'file' ]] { - cp $PKG_ROOT/.list .list-remote + $PKG_PATH/core/include/pkglist $PKG_PATH > .list-remote + if (( newmode == 0 )) { + cp $PKG_ROOT/.list .list-remote + warn "The pkglist version on your packages_root is outdated, please update\n" + } } } |