From 58f180d4eeb98f163123d416fe52e7910d6668a8 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 5 Sep 2023 12:54:24 +0200 Subject: [PATCH] update edk2 build script --- edk2-build.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/edk2-build.py b/edk2-build.py index 2f98863..cae701b 100755 --- a/edk2-build.py +++ b/edk2-build.py @@ -337,7 +337,8 @@ def main(): parser.add_argument('-j', '--jobs', dest = 'jobs', type = str, help = 'allow up to JOBS parallel build jobs', metavar = 'JOBS') - parser.add_argument('-m', '--match', dest = 'match', type = str, + parser.add_argument('-m', '--match', dest = 'match', + type = str, action = 'append', help = 'only run builds matching INCLUDE (substring)', metavar = 'INCLUDE') parser.add_argument('-x', '--exclude', dest = 'exclude', @@ -408,9 +409,14 @@ def main(): for build in cfg.sections(): if not build.startswith('build.'): continue - if options.match and options.match not in build: - print(f'# skipping "{build}" (not matching "{options.match}")') - continue + if options.match: + matching = False + for item in options.match: + if item in build: + matching = True + if not matching: + print(f'# skipping "{build}" (not matching "{"|".join(options.match)}")') + continue if options.exclude: exclude = False for item in options.exclude: