configure: enforce set variable.

This commit is contained in:
Alexandre Pujol 2022-02-22 22:08:58 +00:00
parent 88650bb0d2
commit 027f9e883c
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC

4
configure vendored
View File

@ -3,7 +3,7 @@
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
set -e
set -eu
DISTRIBUTION="$(lsb_release --id --short)"
readonly DISTRIBUTION="${DISTRIBUTION,,}"
@ -97,7 +97,7 @@ flags() {
while read -r profile; do
IFS=' ' read -r -a manifest <<< "$profile"
profile="${manifest[0]}" flags="${manifest[1]}"
profile="${manifest[0]:-}" flags="${manifest[1]:-}"
[[ "$profile" =~ ^\# || -z "$profile" ]] && continue
path="${ROOT:?}/apparmor.d/$profile"