2011-09-01 00:41:12 +00:00
|
|
|
#!/bin/sh -ex
|
|
|
|
|
2015-06-02 17:53:14 +00:00
|
|
|
|
|
|
|
# Populate with some arbitrary files from the local system. Take
|
|
|
|
# a copy to protect against false fails from system updates during test.
|
|
|
|
export PAYLOAD=/tmp/multiple_rsync_payload.$$
|
2015-06-11 10:11:44 +00:00
|
|
|
sudo cp -r /usr/lib/ $PAYLOAD
|
2015-06-02 17:53:14 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
sudo rsync -av $PAYLOAD payload.1
|
|
|
|
sudo rsync -av $PAYLOAD payload.2
|
2011-09-01 00:41:12 +00:00
|
|
|
|
|
|
|
# this shouldn't transfer any additional files
|
2016-04-26 07:56:26 +00:00
|
|
|
echo we should get 4 here if no additional files are transferred
|
2015-06-02 17:53:14 +00:00
|
|
|
sudo rsync -auv $PAYLOAD payload.1 | tee /tmp/$$
|
2013-06-27 05:11:07 +00:00
|
|
|
hexdump -C /tmp/$$
|
|
|
|
wc -l /tmp/$$ | grep 4
|
2015-06-02 17:53:14 +00:00
|
|
|
sudo rsync -auv $PAYLOAD payload.2 | tee /tmp/$$
|
2013-06-27 05:11:07 +00:00
|
|
|
hexdump -C /tmp/$$
|
|
|
|
wc -l /tmp/$$ | grep 4
|
2014-11-07 01:48:01 +00:00
|
|
|
echo OK
|
2015-06-02 17:53:14 +00:00
|
|
|
|
2015-06-16 01:40:35 +00:00
|
|
|
rm /tmp/$$
|
|
|
|
sudo rm -rf $PAYLOAD
|