logo

badwolf

minimalist and privacy-oriented web browser based on WebKitGTK git clone https://hacktivis.me/git/badwolf.git
commit: 8025bc3a27047b7a33f25fabe0161317233212e8
parent 7ba150db12c0512b397b82585b1293204a25590e
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 29 Oct 2021 19:38:46 +0200

configure: Simplify argument parsing

Diffstat:

Mconfigure23++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/configure b/configure @@ -74,27 +74,24 @@ CC="${CC:-cc}" CFLAGS="${CFLAGS:--g -O2 -pie -fPIE}" MANDOC="${MANDOC:-mandoc}" -IFS='' # Also allow variables through arguments for i; do case "$i" in - PREFIX=*|BINDIR=*|MANDIR=*|DOCDIR=*|DATADIR=*|APPSDIR=*) - export "${i%%=*}"="${i#*=}" - shift - ;; - PKGCONFIG=*|MSGFMT=*|INKSCAPE=*|CC=*|CFLAGS=*|MANDOC=*) - export "${i%%=*}"="${i#*=}" - shift - ;; - WITH_WEBKITGTK=*|WITH_URI_PARSER=*) - export "${i%%=*}"="${i#*=}" - shift - ;; -h|--help) usage exit 1 ;; + -*) + printf "Unknown argument ā€˜%sā€™\n" "${i}" + usage + exit 1 + ;; + *=*) + # shellcheck disable=SC2163 + export "$i" + shift + ;; *) printf "Unknown argument ā€˜%sā€™\n" "${i}" usage