chore: fix and cosmetic.
This commit is contained in:
parent
f022ca3299
commit
abaf9fdc7c
2 changed files with 15 additions and 9 deletions
10
configure
vendored
10
configure
vendored
|
|
@ -9,7 +9,7 @@ DISTRIBUTION="$(lsb_release --id --short)"
|
|||
readonly DISTRIBUTION="${DISTRIBUTION,,}"
|
||||
readonly ROOT=.build
|
||||
|
||||
_die() { printf 'Error: %s\n' "$*" >&2 && exit 1; }
|
||||
_die() { printf 'Error: %s\n' "$*" >&2 && exit 1; }
|
||||
_warning() { printf ' Warning: %s\n' "$*" >&2; }
|
||||
_title() { printf '%s\n' "$*" >&2; }
|
||||
_msg() { printf ' - %s\n' "$*" >&2; }
|
||||
|
|
@ -36,7 +36,7 @@ ignore() {
|
|||
while read -r profile; do
|
||||
[[ "$profile" =~ ^\# ]] && continue
|
||||
[[ -z "$profile" ]] && continue
|
||||
if [[ -e "${ROOT:?}/$profile" ]]; then
|
||||
if [[ -e "${ROOT:?}/$profile" ]]; then
|
||||
rm -r "${ROOT:?}/$profile"
|
||||
else
|
||||
find "$ROOT/apparmor.d" -iname "$profile" -type f -exec rm {} \;
|
||||
|
|
@ -86,7 +86,7 @@ configure() {
|
|||
|
||||
;;
|
||||
|
||||
*) _die "$DISTRIBUTION is not a supported distribution." ;;
|
||||
*) _die "$DISTRIBUTION is not a supported distribution." ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ flags() {
|
|||
_msg "Set profiles flags from dists/flags/$name"
|
||||
|
||||
while read -r profile; do
|
||||
IFS=' ' read -r -a manifest <<< "$profile"
|
||||
IFS=' ' read -r -a manifest <<<"$profile"
|
||||
profile="${manifest[0]:-}" flags="${manifest[1]:-}"
|
||||
|
||||
[[ "$profile" =~ ^\# || -z "$profile" ]] && continue
|
||||
|
|
@ -127,7 +127,7 @@ complain() {
|
|||
[[ "$flags" =~ complain ]] && continue
|
||||
echo -n .
|
||||
sed -e "s/flags=(.*)//" \
|
||||
-e "s/ {$/ flags=(complain $flags) {/" \
|
||||
-e "s/ {$/ flags=(complain $flags) {/" \
|
||||
-i "$path"
|
||||
done
|
||||
echo
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue