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>
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";