rbs%maths.uq.edu.au 09abea3ccc Backing out to at least leave the tree usable for those who might pull - bug 124570' mathml-css.pl
git-svn-id: svn://10.0.0.236/trunk@114186 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-11 09:23:41 +00:00

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