diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-01-28 12:55:02 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-01-28 12:55:02 +0100 |
commit | b70c15e0424f9864df7730473f9ced45f526d3b2 (patch) | |
tree | 963715a7e502dd786dc47bfbf75e3faf83d97ff0 | |
parent | Add support for environment overrides. (diff) | |
download | aur-runner-b70c15e0424f9864df7730473f9ced45f526d3b2.tar.gz aur-runner-b70c15e0424f9864df7730473f9ced45f526d3b2.tar.xz |
Allow package declarations to create files.
-rwxr-xr-x | main.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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)) |