Print a warning if profile not found.
This commit is contained in:
parent
046443a702
commit
55f16c329a
1 changed files with 4 additions and 4 deletions
8
configure
vendored
8
configure
vendored
|
|
@ -6,8 +6,8 @@
|
||||||
readonly ROOT=_build
|
readonly ROOT=_build
|
||||||
declare -a REMOVE_LIST
|
declare -a REMOVE_LIST
|
||||||
|
|
||||||
_die() { echo "$@" && exit 1; }
|
_die() { printf '%s\n' "$*" >&2 && exit 1; }
|
||||||
_cd() { cd "$1" || _die "unable to move into $1"; }
|
_warning() { printf 'Warning: %s\n' "$*" >&2; }
|
||||||
_init() { rm -rf "${ROOT:?}" && rsync -a --exclude=.git . "$ROOT"; }
|
_init() { rm -rf "${ROOT:?}" && rsync -a --exclude=.git . "$ROOT"; }
|
||||||
|
|
||||||
# Remove files or directories in the package
|
# Remove files or directories in the package
|
||||||
|
|
@ -84,8 +84,8 @@ generate() {
|
||||||
[[ "$profile" =~ ^\# ]] && continue
|
[[ "$profile" =~ ^\# ]] && continue
|
||||||
path="${ROOT:?}/apparmor.d/profiles/$profile"
|
path="${ROOT:?}/apparmor.d/profiles/$profile"
|
||||||
if [[ ! -f "$path" ]]; then
|
if [[ ! -f "$path" ]]; then
|
||||||
[[ "$DISTRIBUTION" == debian ]] && continue
|
_warning "Profile $profile not found"
|
||||||
_die "Profile $profile not found"
|
contine
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If flags is set, overwrite profile flag
|
# If flags is set, overwrite profile flag
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue