From: Joe Guo Date: Thu, 7 Mar 2019 06:00:37 +0000 (+1300) Subject: bootstrap/template.py: render locale.sh for each dist and make shell scripts executable X-Git-Tag: tdb-1.4.1~375 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c15bbb0e78da1393c5e168d0aafa2fc984ef07c4;p=thirdparty%2Fsamba.git bootstrap/template.py: render locale.sh for each dist and make shell scripts executable Signed-off-by: Joe Guo Reviewed-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/bootstrap/template.py b/bootstrap/template.py index 48c008c53ed..2eb70fd693e 100755 --- a/bootstrap/template.py +++ b/bootstrap/template.py @@ -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)