sbotools2

Maintenance fork of the original sbotools version 2
Log | Files | Refs | README

commit 6f2df0dc61c956b95d40cabb0797e47f7fc9e425
parent cd0d5259b733c90639545d628658bd7c2f613d54
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date:   Mon, 28 Dec 2015 20:01:15 +0100

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:
MSBO-Lib/lib/SBO/Lib.pm | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 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; }