Skip to content

Commit

Permalink
pick: ignore non profile files.
Browse files Browse the repository at this point in the history
  • Loading branch information
roddhjav committed Jan 28, 2022
1 parent 54472e1 commit dc82086
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pick
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ _reload_apparmor() {

pick() {
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
install -Dm0644 "$path" "/etc/apparmor.d/$profile"
[[ "$COMPLAIN" == 1 ]] && _set_complain "/etc/apparmor.d/$profile"
Expand All @@ -57,7 +57,6 @@ cmd_help() {

main() {
local opts err

small_arg="ch"
long_arg="complain,help"
opts="$(getopt -o $small_arg -l $long_arg -n "$PROGRAM" -- "$@")"
Expand Down

0 comments on commit dc82086

Please sign in to comment.