From b70c15e0424f9864df7730473f9ced45f526d3b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 28 Jan 2022 12:55:02 +0100 Subject: Allow package declarations to create files. --- main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.py b/main.py index c847c06..0eace77 100755 --- a/main.py +++ b/main.py @@ -250,6 +250,9 @@ def main(): pkg_names.append(pkg['name']) pkg_options[pkg['name']] = pkg.get('options', '').split(' ') pkg_envs[pkg['name']] = pkg.get('env', {}) + for file in pkg.get('files', []): + with open(file['name'], 'w') as f: + f.write(file['content']) else: logger.fatal('Package entries must be string or dict, not %s', type(pkg)) -- cgit v1.2.3