21 lines
524 B
Python
Executable file
21 lines
524 B
Python
Executable file
#!/usr/bin/python3
|
|
|
|
import json
|
|
import sys
|
|
|
|
def main(tree, options):
|
|
language = options["language"]
|
|
vc_keymap = options.get("vc_keymap")
|
|
|
|
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__':
|
|
args = json.load(sys.stdin)
|
|
r = main(args["tree"], args["options"])
|
|
sys.exit(r)
|