@@ -43,7 +43,7 @@ public class WorkAround extends Const {
43
43
// Each time this class is touched consider changing the String below to enforce
44
44
// updates
45
45
// for debugging I added the system time so the files get refresed at each run
46
- private static final String FIRST_SLOEBER_WORKAROUND_LINE = "#Sloeber created workaound file V1.03.test 01 " ;
46
+ private static final String FIRST_SLOEBER_WORKAROUND_LINE = "#Sloeber created workaound file V1.03.test 03 " ;
47
47
// + String.valueOf(System.currentTimeMillis());
48
48
49
49
/**
@@ -359,6 +359,21 @@ private static String platformApplyStandardWorkArounds(String inPlatformTxt) {
359
359
platformTXT = platformTXT .replace (replaceSet .getKey (), replaceSet .getValue ());
360
360
}
361
361
362
+ // make the size regex expressions compatible with awk
363
+ Pattern regex_pattern = Pattern .compile ("(?m)^recipe\\ .size\\ .regex.*=.*$" );
364
+ Matcher regex_macher = regex_pattern .matcher (platformTXT );
365
+ replaceInfo .clear ();
366
+ while (regex_macher .find ()) {
367
+ String origLine = platformTXT .substring (regex_macher .start (), regex_macher .end ());
368
+ String workedAroundLine = origLine .replace ("(?:" , "(" );
369
+ if (!origLine .equals (workedAroundLine )) {
370
+ replaceInfo .put (origLine , workedAroundLine );
371
+ }
372
+ }
373
+ for (Entry <String , String > replaceSet : replaceInfo .entrySet ()) {
374
+ platformTXT = platformTXT .replace (replaceSet .getKey (), replaceSet .getValue ());
375
+ }
376
+
362
377
// replace FI '-DUSB_PRODUCT={build.usb_product}' with
363
378
// "-DUSB_PRODUCT=\"{build.usb_product}\""
364
379
platformTXT = platformTXT .replaceAll ("\\ '-D(\\ S+)=\\ {(\\ S+)}\\ '" , "\" -D$1=\\ \\ \" {$2}\\ \\ \" \" " );
0 commit comments