summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-07-15 01:01:46 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-07-15 01:01:46 (EDT)
commitd6f809e85faaf7182e6f3697400438792e9d4758 (patch)
treec04af348b30e47a6355ef2f870ae997f41f5e2da
parentf5d34ea1f66a13dc1fc28a459ac503ce02b565f0 (diff)
scripts/gen-mplus-patch.pl: Further improve REs
-rwxr-xr-xscripts/gen-mplus-patch.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/gen-mplus-patch.pl b/scripts/gen-mplus-patch.pl
index 290cb1d..91b3613 100755
--- a/scripts/gen-mplus-patch.pl
+++ b/scripts/gen-mplus-patch.pl
@@ -38,7 +38,7 @@ sub header
next;
}
$version = $entry->string();
- $version =~ s{\AVersion\s1[.]}{}msxa;
+ $version =~ s{\AVersion[ \t]1[.]}{}msxa;
}
($header = <<" EOF") =~ s{^\t\t}{}msxag;
@@ -134,7 +134,7 @@ sub patch_kconfig
$inject .= sprintf("\tdepends on !FONT_MPLUS_%s_%s_%dx%d\n",
uc($face), uc($weight), $width, $height);
}
- $new =~ s{ ^ ( \s* select \s+ FONT_[A-Za-z0-9_]+ \s* ) $ }
+ $new =~ s{ ^ ( [ \t]* select [ \t]+ FONT_[A-Za-z0-9_]+ [ \t]* ) $ }
{$inject$1}msxa;
return make_patch('lib/fonts/Kconfig', $old, $new);
@@ -174,8 +174,8 @@ sub patch_makefile
}
$new =~ s{ \A ( .* ^
font-objs-\$[(]CONFIG_FONT_[A-Za-z0-9_]+[)]
- \s* [+]= \s*
- font_[a-z0-9_]+[.]o \s*
+ [ \t]* [+]= [ \t]*
+ font_[a-z0-9_]+[.]o [ \t]*
$ ) }{$1$inject}msxa;
return make_patch('lib/fonts/Makefile', $old, $new);