post-install 588 B

12345678910111213141516171819202122
  1. # Determine location of Perl module
  2. sax=$(perl -MXML::SAX -le 'print $INC{"XML/SAX.pm"}' 2> /dev/null) && \
  3. sax="${sax%%.pm}/ParserDetails.ini"
  4. # Set up the ParserDetails.ini file, if needed
  5. echo "Setting init file, adding entries (if needed) ..."
  6. if ! fgrep -qs -m1 "[XML::SAX::Expat]" "$sax"
  7. then
  8. echo "$sax ..."
  9. printf "%s\n" \
  10. "[XML::SAX::Expat]" \
  11. "http://xml.org/sax/features/external-general-entities = 1" \
  12. "http://xml.org/sax/features/external-parameter-entities = 1" \
  13. "http://xml.org/sax/features/namespaces = 1" \
  14. "" >> $sax
  15. fi
  16. unset sax