sbotools2

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

commit 15ebf5ad1fd33d451409e9f51d10d32df4a22087
parent 9fbebe484aea34de5abc9d06daa8fd3f64c2cb26
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date:   Thu, 18 May 2017 16:08:26 +0200

SBO::Lib::Repo: exit with error when repo synch fails.

This fixes #61.

Diffstat:
MSBO-Lib/lib/SBO/Lib/Repo.pm | 4+++-
Mman1/sbosnap.1 | 3+++
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/SBO-Lib/lib/SBO/Lib/Repo.pm b/SBO-Lib/lib/SBO/Lib/Repo.pm @@ -6,7 +6,7 @@ use warnings; our $VERSION = '2.4'; -use SBO::Lib::Util qw/ %config prompt usage_error get_slack_version script_error open_fh open_read in /; +use SBO::Lib::Util qw/ %config prompt usage_error get_slack_version script_error open_fh open_read in _ERR_DOWNLOAD /; use Cwd; use File::Copy; @@ -300,6 +300,8 @@ sub pull_sbo_tree { $res = git_sbo_tree($url); } + if ($res == 0) { warn "Could not sync from $url.\n"; exit _ERR_DOWNLOAD; } + my $wanted = sub { chown 0, 0, $File::Find::name; }; find($wanted, $repo_path) if -d $repo_path; if ($res and not chk_slackbuilds_txt()) { diff --git a/man1/sbosnap.1 b/man1/sbosnap.1 @@ -40,6 +40,9 @@ sbosnap can exit with the following codes: .RS 1: a usage error occurred, such as running sbosnap with no command. .RE +.RS +5: error downloading from the repository. +.RE .SH BUGS .P None known, but there may be some. Please report any found to https://github.com/pink-mist/sbotools/issues ; patches are always welcome.