mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 08:35:26 +00:00
1d126be6cd
--HG-- extra : rebase_source : c6ba6e900ceed210620d47f70c9b962a808a29fe
21 lines
508 B
Perl
21 lines
508 B
Perl
# add mathml.css to the ua.css
|
|
|
|
$sep = '/'; # directory separator
|
|
|
|
$ua = $ARGV[0]; $ua =~ s|\\|$sep|g;
|
|
|
|
open(UA, $ua) || die "Cannot find ua.css\n";
|
|
$css = join("", <UA>);
|
|
close(UA);
|
|
|
|
if (!($css =~ m|\@import.*mathml\.css|))
|
|
{
|
|
# since bad end of lines cause troubles on some platforms
|
|
# do a little perl magic for dos2{unix or mac} here
|
|
$css =~ s#(\@import[^\@]+\;)(\cM?)(\n\cM?\n)#$1$2\n\@import url\(resource://gre-resources/mathml\.css\);$2$3#;
|
|
open(UA, ">$ua");
|
|
print UA $css;
|
|
close(UA);
|
|
}
|
|
|