gecko-dev/layout/mathml/mathml-css.pl
Robert O'Callahan beac740c0f Bug 484766. Clean up MathML directory structure. r=karlt,ted
--HG--
extra : rebase_source : 1c88ebe3a41dee12a982442ad2e711aa287ed55f
2009-03-30 13:48:52 +13:00

21 lines
502 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/res/mathml\.css\);$2$3#;
open(UA, ">$ua");
print UA $css;
close(UA);
}