sysupdate: Allow patterns to match path with directories
`MatchPattern` for regular-file and directory as target can now match subdirectories This is useful to install files for examples in `.extra.d` directories: ``` [Target] Type=regular-file Path=/EFI/Linux PathRelativeTo=boot MatchPattern=gnomeos_@v.efi.extra.d/apparmor.addon.efi ``` The if the directories in the path do not exist, they will be created. Whereas the part in `Path` is not created.
This commit is contained in:
@@ -6,6 +6,12 @@
|
||||
#include "sysupdate-instance.h"
|
||||
#include "time-util.h"
|
||||
|
||||
enum {
|
||||
PATTERN_MATCH_NO,
|
||||
PATTERN_MATCH_YES,
|
||||
PATTERN_MATCH_RETRY,
|
||||
};
|
||||
|
||||
int pattern_match(const char *pattern, const char *s, InstanceMetadata *ret);
|
||||
int pattern_match_many(char **patterns, const char *s, InstanceMetadata *ret);
|
||||
int pattern_valid(const char *pattern);
|
||||
|
||||
Reference in New Issue
Block a user