From 55f16c329a28e636e234a2762cc270d5ccd79641 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Sun, 4 Apr 2021 16:47:47 +0100 Subject: [PATCH] Print a warning if profile not found. --- configure | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index bd79eb63..e766a5f2 100755 --- a/configure +++ b/configure @@ -6,8 +6,8 @@ readonly ROOT=_build declare -a REMOVE_LIST -_die() { echo "$@" && exit 1; } -_cd() { cd "$1" || _die "unable to move into $1"; } +_die() { printf '%s\n' "$*" >&2 && exit 1; } +_warning() { printf 'Warning: %s\n' "$*" >&2; } _init() { rm -rf "${ROOT:?}" && rsync -a --exclude=.git . "$ROOT"; } # Remove files or directories in the package @@ -84,8 +84,8 @@ generate() { [[ "$profile" =~ ^\# ]] && continue path="${ROOT:?}/apparmor.d/profiles/$profile" if [[ ! -f "$path" ]]; then - [[ "$DISTRIBUTION" == debian ]] && continue - _die "Profile $profile not found" + _warning "Profile $profile not found" + contine fi # If flags is set, overwrite profile flag