From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [OSSTEST PATCH 4/8] cr-publish-flight-logs: Refactor rsync -e option construction
Date: Wed, 11 Jul 2018 15:14:16 +0100 [thread overview]
Message-ID: <1531318460-4509-5-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1531318460-4509-1-git-send-email-ian.jackson@eu.citrix.com>
Previously this was hardcoded. Now we make a variable @ssh, and use
rsync's quoting scheme to transform it into a value suitable for -e.
No overall functional change, although now the rsync command contains
additional quotes in the -e option.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
cr-publish-flight-logs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cr-publish-flight-logs b/cr-publish-flight-logs
index 539318d..9e13652 100755
--- a/cr-publish-flight-logs
+++ b/cr-publish-flight-logs
@@ -61,8 +61,9 @@ sub copydir ($$) {
return unless $c{"${cfgbase}Publish"};
my $src = $c{$cfgbase}.$subdir."/";
my $dst = $c{"${cfgbase}Publish"}.$subdir;
+ my @ssh = qw(ssh -o batchmode=yes);
my @cmd= qw(rsync --compress --compress-level=9 --stats --delete -auH);
- push @cmd, '-e', 'ssh -o batchmode=yes';
+ push @cmd, '-e', join(' ', map { s/\'/''/g; "'$_'"; } @ssh);
#--bwlimit=50
push @cmd, $src, $dst;
print "+ @cmd\n";
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-07-11 14:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-11 14:14 [OSSTEST PATCH 0/8] Log publication from Citrix Cambridge Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 1/8] cr-ensure-disk-space: With -D, print check_space command Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 2/8] Publish: Default LogsPublish and ResultsPublish from Publish Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 3/8] cr-publish-flight-logs: Refactor copydir args Ian Jackson
2018-07-11 14:14 ` Ian Jackson [this message]
2018-07-11 14:14 ` [OSSTEST PATCH 5/8] Publish: Introduce publish_ssh_opts Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 6/8] Publish: Introduce {Logs, Results}PublishSshOpts Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 7/8] Publish: Cambridge: Publish to new public host Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 8/8] Publish: Cambridge: Get the public URL right Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1531318460-4509-5-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).