Skip to content

Commit 3a7478e

Browse files
ctruedengselzer
authored andcommitted
generate.groovy: always regenerate all files
We only run by hand now, so there is no reason to skip files, regardless of datestamps.
1 parent 956d3c7 commit 3a7478e

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

bin/generate.groovy

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,6 @@ def translate(templateSubdirectory, templateFile, translationsFile) {
114114
context = outputFilename = null;
115115
reader = new java.io.BufferedReader(new java.io.FileReader("$templateSubdirectory/$translationsFile"));
116116

117-
// avoid rewriting unchanged code to avoid recompilation
118-
mtime = java.lang.Math.max(
119-
timestamp(templateSubdirectory, translationsFile),
120-
timestamp(templateSubdirectory, templateFile));
121-
122117
sh = new groovy.lang.GroovyShell();
123118
for (;;) {
124119
// read the line
@@ -128,9 +123,7 @@ def translate(templateSubdirectory, templateFile, translationsFile) {
128123
// check if the line starts a new section
129124
if (line.startsWith("[") && line.endsWith("]")) {
130125
// write out the previous file
131-
if (mtime >= timestamp(outputDirectory, outputFilename)) {
132-
processTemplate(engine, context, templateFile, outputFilename);
133-
}
126+
processTemplate(engine, context, templateFile, outputFilename);
134127

135128
// start a new file
136129
outputFilename = line.substring(1, line.length() - 1);
@@ -183,9 +176,7 @@ def translate(templateSubdirectory, templateFile, translationsFile) {
183176
reader.close();
184177

185178
// process the template
186-
if (mtime >= timestamp(outputDirectory, outputFilename)) {
187-
processTemplate(engine, context, templateFile, outputFilename);
188-
}
179+
processTemplate(engine, context, templateFile, outputFilename);
189180
}
190181

191182
/* Recursively translates all templates in the given directory. */

0 commit comments

Comments
 (0)