summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-01-28 12:55:02 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-01-28 12:55:02 +0100
commitb70c15e0424f9864df7730473f9ced45f526d3b2 (patch)
tree963715a7e502dd786dc47bfbf75e3faf83d97ff0
parentAdd support for environment overrides. (diff)
downloadaur-runner-b70c15e0424f9864df7730473f9ced45f526d3b2.tar.gz
aur-runner-b70c15e0424f9864df7730473f9ced45f526d3b2.tar.xz
Allow package declarations to create files.
-rwxr-xr-xmain.py3
1 files changed, 3 insertions, 0 deletions
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))