From 1e42ebd1f2a26a5205aeb709933c987f924a8d1c Mon Sep 17 00:00:00 2001 From: Guillaume Bougard Date: Fri, 13 Nov 2020 10:00:16 +0100 Subject: [PATCH] Add pp error check --- ...ld-strawberry-perl-package-for-fusioninventory-agent.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Perl/Scripts/build-strawberry-perl-package-for-fusioninventory-agent.sh b/Perl/Scripts/build-strawberry-perl-package-for-fusioninventory-agent.sh index 2b53faf..8436ddb 100755 --- a/Perl/Scripts/build-strawberry-perl-package-for-fusioninventory-agent.sh +++ b/Perl/Scripts/build-strawberry-perl-package-for-fusioninventory-agent.sh @@ -229,6 +229,13 @@ while (( ${iter} < ${#archs[@]} )); do "${tmpdir}/${strawberry_pepfia_par_template_file}" > ../../pp-${arch_label}s.log 2>&1 ) + # Check whether there is an error + if (( $? != 0 )); then + echo + echo "There has been an error while building the Perl ARchive (PAR) package for Strawberry Perl ${strawberry_release} (${strawberry_version}-${arch_label}s)." + exit 5 + fi + # Partial clean # It seems "${tmpdir}/inc" is created when pp takes into account # the Perl module inc::Module::Install