diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-09-29 21:28:55 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-09-30 12:27:06 +0200 |
commit | f7e0d22d76ead994a848049fb45afd9a6fb9915a (patch) | |
tree | 5875e694923192d7c7a9d1b89fb18dba6a9ca22a /configure | |
parent | 1c3f490f230c1dad83901b1768456082159f2cbe (diff) | |
download | systemd-f7e0d22d76ead994a848049fb45afd9a6fb9915a.tar.gz |
tools: shellcheck-ify tool scripts
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -2,22 +2,23 @@ # SPDX-License-Identifier: LGPL-2.1-or-later set -e -cflags=CFLAGS="$CFLAGS" -cxxflags=CXXFLAGS="$CXXFLAGS" -declare -a args -j=0 -for i in "$@"; do - case "$i" in +cflags="CFLAGS=${CFLAGS-}" +cxxflags="CXXFLAGS=${CXXFLAGS-}" +args=() + +for arg in "$@"; do + case "$arg" in CFLAGS=*) - cflags="$i";; + cflags="$arg" + ;; CXXFLAGS=*) - cxxflags="$i";; - *) - args[$j]="$i" - j=$((j+1)) + cxxflags="$arg" + ;; + *) + args+=("$arg") esac done -export "$cflags" "$cxxflags" +export "${cflags?}" "${cxxflags?}" set -x exec meson build "${args[@]}" |