[mkinitcpio,v2,1/2] functions: add_full_dir: recursive filter

Message ID 1496338158-3540-1-git-send-email-erik.stromdahl@gmail.com
State Accepted
Headers show
Series [mkinitcpio,v2,1/2] functions: add_full_dir: recursive filter | expand

Commit Message

Emil Velikov via arch-projects June 1, 2017, 5:29 p.m. UTC
By passing the filter glob in all recursive invocations of
add_full_dir, the filtering is performed on all subdirs and
not just the top dir.

This makes the implementation correspond to the documented
behavior in the man page.

Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
 functions | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/functions b/functions
index e35a03b..0c407e9 100644
--- a/functions
+++ b/functions
@@ -435,7 +435,7 @@  add_full_dir() {
                     add_symlink "$f" "$(readlink "$f")"
                 fi
             elif [[ -d $f ]]; then
-                add_full_dir "$f"
+                add_full_dir "$f" "$filter"
             elif [[ -f $f ]]; then
                 if [[ $f = $filter ]]; then
                     add_file "$f"