get(Hook)Files: handle globs and recurse into directories
This MR includes three changes:
- Use
getFile
ingetHookFiles
to add the contents of file hooks - Within
getFile
, first attempted a glob expansion on the specified file expression. This allows specifying e.g./lib/udev/rules.d/*.rules
. - Within
getFile
, next if the path points to a directory, add all files including those from subdirectories. This allows specifying e.g./usr/share/X11/xkb
.
The extra features of getFile
could also be leveraged to shorten some of the other code that currently calls this function. I didn't do this for now to keep the diff small for the sake of review.
The original version of the MR (which did 2. but only in getHookFiles
) is still retained in the first commit. If the approach is agreed upon, I'll squash the commits.
Edited by Administrator