configure: fail on first error.

This commit is contained in:
Alexandre Pujol 2022-02-16 13:29:53 +00:00
parent 6876938719
commit 7efd6c75d7
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC

4
configure vendored
View File

@ -3,6 +3,8 @@
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io> # Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
set -e
DISTRIBUTION="$(lsb_release --id --short)" DISTRIBUTION="$(lsb_release --id --short)"
readonly DISTRIBUTION="${DISTRIBUTION,,}" readonly DISTRIBUTION="${DISTRIBUTION,,}"
readonly ROOT=.build readonly ROOT=.build
@ -155,7 +157,7 @@ main() {
COMPLAIN=0 COMPLAIN=0
small_arg="cfh" small_arg="cfh"
long_arg="complain,full,help" long_arg="complain,full,help"
opts="$(getopt -o $small_arg -l $long_arg -n "$PROGRAM" -- "$@")" opts="$(getopt -o $small_arg -l $long_arg -n "configure" -- "$@")"
err=$? err=$?
eval set -- "$opts" eval set -- "$opts"
while true; do case $1 in while true; do case $1 in