Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BuildPackages.sh: add option to abort upon failure #2022

Merged
merged 1 commit into from
Dec 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions bin/BuildPackages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ fi
CURDIR="$(pwd)"
GAPROOT="$(cd .. && pwd)"
COLORS=yes
STRICT=no # exit with non-zero exit code when encountering any failures
PACKAGES=()

# If output does not go into a terminal (but rather into a log file),
Expand All @@ -44,7 +45,13 @@ while [[ "$#" -ge 1 ]]; do
case "$option" in
--with-gaproot) GAPROOT="$1"; shift ;;
--with-gaproot=*) GAPROOT=${option#--with-gaproot=}; ;;

--no-color) COLORS=no ;;
--color) COLORS=yes ;;

--no-strict) STRICT=no ;;
--strict) STRICT=yes ;;

-*) echo "ERROR: unsupported argument $option" ; exit 1;;
*) PACKAGES+=("$option") ;;
esac
Expand Down Expand Up @@ -183,6 +190,10 @@ build_fail() {
echo ""
warning "Failed to build $PKG"
echo "$PKG" >> "$LOGDIR/fail.log"
if [[ $STRICT = yes ]]
then
exit 1
fi
}

run_configure_and_make() {
Expand Down