You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2013/09/18 23:13:12 UTC
svn commit: r1524567 - /qpid/trunk/qpid/cpp/src/tests/rsynchosts
Author: aconway
Date: Wed Sep 18 21:13:12 2013
New Revision: 1524567
URL: http://svn.apache.org/r1524567
Log:
NO-JIRA: added -l USER option to rsynchosts script.
Modified:
qpid/trunk/qpid/cpp/src/tests/rsynchosts
Modified: qpid/trunk/qpid/cpp/src/tests/rsynchosts
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/rsynchosts?rev=1524567&r1=1524566&r2=1524567&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/rsynchosts (original)
+++ qpid/trunk/qpid/cpp/src/tests/rsynchosts Wed Sep 18 21:13:12 2013
@@ -27,13 +27,21 @@ abspath() {
}
usage() {
- echo "Usage: $(basename $0) file [file...]
+ echo "Usage: $(basename $0) [-l user] file [file...]
Synchronize the contents of each file or directory to the same absolute path on
each host in \$HOSTS.
"
exit 1
}
+while getopts "l:" opt; do
+ case $opt in
+ l) RSYNC_USER="$OPTARG@" ;;
+ *) usage ;;
+ esac
+done
+shift `expr $OPTIND - 1`
+
test "$*" || usage
for f in $*; do FILES="$FILES $(abspath $f)" || exit 1; done
@@ -42,7 +50,7 @@ OK_FILE=`mktemp` # Will be deleted if a
trap "rm -f $OK_FILE" EXIT
for h in $HOSTS; do
- rsync -aRO --delete $FILES $h:/ || { echo "rsync to $h failed"; rm -f $OK_FILE; } &
+ rsync -vaRO --delete $FILES $RSYNC_USER$h:/ || { echo "rsync to $h failed"; rm -f $OK_FILE; } &
done
wait
test -f $OK_FILE
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org