bootstrap/template.py: render locale.sh for each dist and make shell scripts executable
authorJoe Guo <joeg@catalyst.net.nz>
Thu, 7 Mar 2019 06:00:37 +0000 (19:00 +1300)
committerStefan Metzmacher <metze@samba.org>
Thu, 18 Apr 2019 12:09:33 +0000 (12:09 +0000)
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
bootstrap/template.py

index 48c008c..2eb70fd 100755 (executable)
@@ -38,11 +38,13 @@ def render(dists):
     for dist, config in dists.items():
         home = config['home']
         os.makedirs(home, exist_ok=True)
-        for key in ['packages.yml', 'bootstrap.sh', 'Dockerfile']:
+        for key in ['bootstrap.sh', 'locale.sh', 'packages.yml', 'Dockerfile']:
             path = os.path.join(home, key)
             log.info('%s: render "%s" to %s', dist, key, path)
             with io.open(path, mode='wt', encoding='utf8') as fp:
                 fp.write(config[key])
+            if path.endswith('.sh'):
+                os.chmod(path, 0o755)
 
         key = 'Vagrantfile'
         path = os.path.join(OUT, key)