parent
35607c2178
commit
0c6ec8fb29
|
@ -16,7 +16,6 @@ bash gen_signature.sh hellen_cypress
|
|||
|
||||
java \
|
||||
-DSystemOut.name=gen_config_hellen_cypress \
|
||||
-Drusefi.generator.lazyfile.enabled=true \
|
||||
-jar ../java_tools/ConfigDefinition.jar \
|
||||
-definition integration/rusefi_config.txt \
|
||||
-cache hellen_cypress \
|
||||
|
|
|
@ -16,7 +16,6 @@ bash gen_signature.sh kin
|
|||
|
||||
java \
|
||||
-DSystemOut.name=gen_config_kinetis \
|
||||
-Drusefi.generator.lazyfile.enabled=true \
|
||||
-jar ../java_tools/ConfigDefinition.jar \
|
||||
-definition integration/rusefi_config.txt \
|
||||
-cache kinetis \
|
||||
|
|
|
@ -6,7 +6,6 @@ rm -f gen_config_board.log
|
|||
bash gen_signature.sh all
|
||||
|
||||
java -DSystemOut.name=gen_config \
|
||||
-Drusefi.generator.lazyfile.enabled=true \
|
||||
-jar ../java_tools/ConfigDefinition.jar \
|
||||
-definition integration/rusefi_config.txt \
|
||||
-romraider integration \
|
||||
|
|
|
@ -11,15 +11,9 @@ import java.util.regex.Pattern;
|
|||
public class LazyFile implements Output {
|
||||
public static final String LAZY_FILE_TAG = "was generated automatically by rusEFI tool ";
|
||||
public static final String LAZY_FILE_TAG_LOWER = LAZY_FILE_TAG.toLowerCase();
|
||||
private static final String PROPERTY_NAME = "rusefi.generator.lazyfile.enabled";
|
||||
private static boolean ENABLED = Boolean.getBoolean(PROPERTY_NAME);
|
||||
private static boolean isLazyCheckEnabled = true;
|
||||
|
||||
static {
|
||||
SystemOut.println(PROPERTY_NAME + "=" + ENABLED);
|
||||
}
|
||||
|
||||
private String filename;
|
||||
private final String filename;
|
||||
|
||||
private final StringBuffer content = new StringBuffer();
|
||||
private final StringBuffer contentWithoutTag = new StringBuffer();
|
||||
|
@ -31,7 +25,7 @@ public class LazyFile implements Output {
|
|||
@Override
|
||||
public void write(String line) {
|
||||
content.append(line);
|
||||
String lines[] = line.split("\\r?\\n");
|
||||
String[] lines = line.split("\\r?\\n");
|
||||
for (String subLine : lines) {
|
||||
if (!subLine.toLowerCase().contains(LAZY_FILE_TAG_LOWER)) {
|
||||
contentWithoutTag.append(subLine);
|
||||
|
@ -84,7 +78,7 @@ public class LazyFile implements Output {
|
|||
Scanner in = new Scanner(Paths.get(filename), IoUtils.CHARSET.name());
|
||||
Pattern pat = Pattern.compile(".*\\R|.+\\z");
|
||||
String line;
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
while ((line = in.findWithinHorizon(pat, 0)) != null) {
|
||||
if (!line.toLowerCase().contains(LAZY_FILE_TAG_LOWER))
|
||||
sb.append(line);
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue