diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/base.oeclass | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/classes/base.oeclass b/classes/base.oeclass index 8c50abb2cd..4896510567 100644 --- a/classes/base.oeclass +++ b/classes/base.oeclass @@ -39,6 +39,22 @@ def base_set_filespath(path, d): FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}" +def filter(f, str, d): + from re import match + ret = [] + for w in str.split(): + if match(f, w, 0): + ret += [ w ] + return " ".join(ret) + +def filter_out(f, str, d): + from re import match + ret = [] + for w in str.split(): + if not match(f, w, 0): + ret += [ w ] + return " ".join(ret) + die() { oefatal "$*" } |