summaryrefslogtreecommitdiffstats
path: root/abs/core/perl_modules/perl-xml-libxml/perl-xml-libxml.install
blob: 6085ff00288d0dd7fcb4bb9ba6568b76122c2008 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
}


op=$1
shift
$op $*