pick: ignore non profile files.

This commit is contained in:
Alexandre Pujol 2022-01-28 13:01:06 +00:00
parent 54472e187b
commit dc820868a0
Failed to generate hash of commit

3
pick
View file

@ -35,7 +35,7 @@ _reload_apparmor() {
pick() { pick() {
for profile in "$@"; do for profile in "$@"; do
path="$(find apparmor.d -iname "$profile" -type f)" path="$(find apparmor.d -iname "$profile" -type f -not -path './apparmor.d/tunables/*' -not -path './apparmor.d/abstractions/*')"
if [[ -f "$path" ]]; then if [[ -f "$path" ]]; then
install -Dm0644 "$path" "/etc/apparmor.d/$profile" install -Dm0644 "$path" "/etc/apparmor.d/$profile"
[[ "$COMPLAIN" == 1 ]] && _set_complain "/etc/apparmor.d/$profile" [[ "$COMPLAIN" == 1 ]] && _set_complain "/etc/apparmor.d/$profile"
@ -57,7 +57,6 @@ cmd_help() {
main() { main() {
local opts err local opts err
small_arg="ch" small_arg="ch"
long_arg="complain,help" long_arg="complain,help"
opts="$(getopt -o $small_arg -l $long_arg -n "$PROGRAM" -- "$@")" opts="$(getopt -o $small_arg -l $long_arg -n "$PROGRAM" -- "$@")"