debian-forge/stages/io.weldr.locale
Tom Gundersen 34de8e0274 osbuild: always pass an input_dir argument
All stages must be able to handle an input_dir argument, as we now
either pass it to all or none for agiven run. Simply set it to
'None' if it is not provided.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-06-12 18:54:31 +02:00

18 lines
449 B
Python
Executable file

#!/usr/bin/python3
import json
import sys
def main(tree, input_dir, language, vc_keymap=None):
with open(f"{tree}/etc/locale.conf", "w") as f:
f.write(f'LANG="{language}"\n')
if vc_keymap:
with open(f"{tree}/etc/vconsole.conf", "w") as f:
f.write(f'KEYMAP="{vc_keymap}"\n')
f.write(f'FONT="eurlatgr"\n')
if __name__ == '__main__':
options = json.load(sys.stdin)
sys.exit(main(**options))