aboutsummaryrefslogtreecommitdiff
path: root/SBO-Lib/lib/SBO
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-28 20:01:15 +0100
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-28 20:01:15 +0100
commit6f2df0dc61c956b95d40cabb0797e47f7fc9e425 (patch)
tree9de06a8030cc8c73456a0148b0ebcd72526121a2 /SBO-Lib/lib/SBO
parentcd0d5259b733c90639545d628658bd7c2f613d54 (diff)
downloadsbotools2-6f2df0dc61c956b95d40cabb0797e47f7fc9e425.tar.xz
Make sure we only use --info=progress2 on new os
Slackware 14.1 and below don't support it, so the slackware version needs to be reported as higher than 14.1 for us to use it.
Diffstat (limited to 'SBO-Lib/lib/SBO')
-rw-r--r--SBO-Lib/lib/SBO/Lib.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm
index 0f07fd1..664ee32 100644
--- a/SBO-Lib/lib/SBO/Lib.pm
+++ b/SBO-Lib/lib/SBO/Lib.pm
@@ -286,7 +286,10 @@ sub rsync_sbo_tree {
exists $_[0] or script_error('rsync_sbo_tree requires an argument.');
my $url = shift;
$url .= '/' unless $url =~ m!/$!; # make sure $url ends with /
- my @args = ('rsync', '--info=progress2', '-a', '--exclude=*.tar.gz', '--exclude=*.tar.gz.asc', '--delete', $url);
+ my @info;
+ # only slackware versions above 14.1 have an rsync that supports --info=progress2
+ if (versioncmp(get_slack_version(), '14.1') == 1) { @info = ('--info=progress2'); }
+ my @args = ('rsync', @info, '-a', '--exclude=*.tar.gz', '--exclude=*.tar.gz.asc', '--delete', $url);
return system(@args, $repo_path) == 0;
}