Skip to content

Commit bd772e3

Browse files
committed
build: Use unpackdir from build.lua for dictionaries
Otherwise they would always be unpacked into the build subdirectory.
1 parent 78d5114 commit bd772e3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

build.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ unpack = function (names)
8787
end
8888

8989
-- Really, a weblate .dict plugin would make more sense than this
90-
errorlevel = run('.', './generate-dictionaries.py')
90+
errorlevel = run('.', './generate-dictionaries.py "' .. unpackdir .. '"')
9191
if errorlevel ~=0 then
9292
print("Failed to generate dictonaries from translation sources")
9393
end

generate-dictionaries.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22

3+
import sys
34
import latexmap
45
import glob
56
import os
@@ -34,7 +35,7 @@ def unicode_to_latex(string):
3435
return string
3536

3637

37-
dest_dir = 'build/unpacked'
38+
dest_dir = sys.argv[1]
3839
dicts = {}
3940

4041
for infile in glob.glob('dict/*.ini'):

0 commit comments

Comments
 (0)