diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2017-04-20 07:01:07 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2017-04-20 07:09:33 +0000 |
commit | f7b6b0ee5132ff136d2d3fd9b86f53579475c166 (patch) | |
tree | 645c26332d9f443d4887a1e3b2410d71004b57ce /tcwg-rsync-dir.sh | |
parent | 677427a5210a58aae0b2937c2aa78fb17b311117 (diff) |
tcwg-rsync-dir.sh: Improve handling of verbose.
Change-Id: I7b0812324adc12a97562b3bb2efcc26f0520725c
Diffstat (limited to 'tcwg-rsync-dir.sh')
-rwxr-xr-x | tcwg-rsync-dir.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tcwg-rsync-dir.sh b/tcwg-rsync-dir.sh index 520eabb7..d129b606 100755 --- a/tcwg-rsync-dir.sh +++ b/tcwg-rsync-dir.sh @@ -14,7 +14,9 @@ while test $# -gt 0; do done if $verbose; then - set -x + verbose="set -x" +else + verbose="" fi if [ x"$snapshots_dir" = x"" ]; then @@ -29,6 +31,7 @@ todo_machines="$@" for M in $todo_machines; do ( + $verbose rsync -az --delete $snapshots_dir-new/ $M:$snapshots_dir-new/ ssh -fn $M "flock -x $snapshots_dir.lock -c \"rsync -a --delete ${snapshots_dir}-new/ $snapshots_dir/\"" ) > /tmp/update-snapshots-ref.$$.$M 2>&1 & |