util/gen_xmlpool: Don't write via shell redirection

Using shell redirection to write to a file is more complicated than
necessary, and has the potential to run into unicode encoding problems.
It's also less code.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108530

v2: - update commit message to say less about LANG=C
    - use flags instead of positional arguments for the script (Emil)

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
Dylan Baker
2018-10-24 12:20:48 -07:00
parent 1df086662a
commit b9cd81ea31
5 changed files with 57 additions and 64 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ xmlpool_options, = env.CodeGenerate(
target = 'options.h',
script = 'gen_xmlpool.py',
source = ['t_options.h'],
command = python_cmd + ' $SCRIPT $SOURCE ' + LOCALEDIR + ' > $TARGET'
command = python_cmd + ' $SCRIPT --template $SOURCE --output $TARGET --localedir ' + LOCALEDIR
)
Export('xmlpool_options')