snaprep

git mirror of https://ccx.te2000.cz/bzr/snaprep
git clone https://ccx.te2000.cz/git/snaprep
Log | Files | Refs

commit 42fee7c70152f68054a546df28e21c677662a627
parent b536866313da4659d825dbc6f513d493c1b39f78
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Thu, 27 Feb 2014 00:31:43 +0100

pass in args, list properly on local push
Diffstat:
Mbin/snap.push.single | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/bin/snap.push.single b/bin/snap.push.single @@ -66,10 +66,10 @@ push_remote() { push_local() { test -d "$SNAP_DST" || die "destination not a directory: ${SNAP_DST}" - snapshot=$(snap.list "$SNAP_DST" | tail -1) - if test -n $snapshot; then + snapshot=$(snap.list "$SNAP_DST/" | tail -1) + if test -n "$snapshot"; then link=${SNAP_DST}/${snapshots} - rs "$@" "--link-dest=$link" "$SNAP_SRC/" "$SNAP_DST/$ts/" || exit $? + rs "$@" "--link-dest=$link/" "$SNAP_SRC/" "$SNAP_DST/$ts/" || exit $? else rs "$@" "$SNAP_SRC/" "$SNAP_DST/$ts/" || exit $? fi @@ -82,8 +82,8 @@ case "$SNAP_SRC" in esac case "$SNAP_DST" in - (rsync:*) push_remote;; - (*::*) push_remote;; + (rsync:*) push_remote "$@";; + (*::*) push_remote "$@";; (*:*) die "pushing via remote shell directly not supported, use -e with rsync:// instead";; - (*) push_local;; + (*) push_local "$@";; esac