summaryrefslogtreecommitdiff
path: root/community-testing/perl-xml-libxml/perl-xml-libxml.install
blob: 43c29a245aed133f3765602490598e485cf1e27e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
post_install() {
  echo ":: Installing SAX XML Parsers"
  /usr/bin/perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
  /usr/bin/perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX))->save_parsers()"
}

post_upgrade() {
  libxmlcount=`grep -c XML::LibXML::SAX /usr/share/perl5/vendor_perl/XML/SAX/ParserDetails.ini`
  if [[ $libxmlcount == 0 ]]; then
	  echo ":: Installing SAX XML Parsers"
	  /usr/bin/perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
	  /usr/bin/perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX))->save_parsers()"
  fi
}