mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-14 23:43:56 +01:00
Print a warning if profile not found.
This commit is contained in:
parent
046443a702
commit
55f16c329a
8
configure
vendored
8
configure
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user