#!/bin/bash
config() {
  NEW="$1"
  OLD="$( dirname $NEW )/$( basename $NEW .new )"
  # If there's no config file by that name, mv it over:
  if [ ! -r $OLD ]; then
    mv $NEW $OLD
  elif [ "$( md5sum < $OLD )" = "$( md5sum < $NEW )" ]; then # toss the redundant copy
    rm $NEW
  fi
  # Otherwise, we leave the .new copy for the admin to consider...
}

config etc/asciidoc/lang-fr.conf.new
config etc/asciidoc/latex.conf.new
config etc/asciidoc/filters/latex/latex-filter.conf.new
config etc/asciidoc/filters/source/source-highlight-filter.conf.new
config etc/asciidoc/filters/music/music-filter.conf.new
config etc/asciidoc/filters/graphviz/graphviz-filter.conf.new
config etc/asciidoc/filters/code/code-filter.conf.new
config etc/asciidoc/html4.conf.new
config etc/asciidoc/asciidoc.conf.new
config etc/asciidoc/lang-el.conf.new
config etc/asciidoc/lang-de.conf.new
config etc/asciidoc/lang-ru.conf.new
config etc/asciidoc/docbook45.conf.new
config etc/asciidoc/lang-cs.conf.new
config etc/asciidoc/lang-en.conf.new
config etc/asciidoc/xhtml11-quirks.conf.new
config etc/asciidoc/text.conf.new
config etc/asciidoc/lang-ro.conf.new
config etc/asciidoc/xhtml11.conf.new
config etc/asciidoc/lang-nl.conf.new
config etc/asciidoc/lang-es.conf.new
config etc/asciidoc/lang-pt-BR.conf.new
config etc/asciidoc/lang-hu.conf.new
config etc/asciidoc/html5.conf.new
config etc/asciidoc/lang-it.conf.new
config etc/asciidoc/slidy.conf.new
config etc/asciidoc/lang-uk.conf.new
config etc/asciidoc/help.conf.new
( cd usr/bin ; rm -rf db2pdf )
( cd usr/bin ; ln -sf docbook2pdf db2pdf )
( cd usr/bin ; rm -rf db2html )
( cd usr/bin ; ln -sf docbook2html db2html )
( cd usr/bin ; rm -rf db2rtf )
( cd usr/bin ; ln -sf docbook2rtf db2rtf )
( cd usr/bin ; rm -rf sgml2xml )
( cd usr/bin ; ln -sf osgml2xml sgml2xml )
( cd usr/bin ; rm -rf spent )
( cd usr/bin ; ln -sf ospent spent )
( cd usr/bin ; rm -rf osx )
( cd usr/bin ; ln -sf osgml2xml osx )
( cd usr/bin ; rm -rf asciidoc )
( cd usr/bin ; ln -sf asciidoc.py asciidoc )
( cd usr/bin ; rm -rf sgml2info )
( cd usr/bin ; ln -sf linuxdoc sgml2info )
( cd usr/bin ; rm -rf db2dvi )
( cd usr/bin ; ln -sf docbook2dvi db2dvi )
( cd usr/bin ; rm -rf a2x )
( cd usr/bin ; ln -sf a2x.py a2x )
( cd usr/bin ; rm -rf sgmlnorm )
( cd usr/bin ; ln -sf osgmlnorm sgmlnorm )
( cd usr/bin ; rm -rf db2ps )
( cd usr/bin ; ln -sf docbook2ps db2ps )
( cd usr/bin ; rm -rf sgml2latex )
( cd usr/bin ; ln -sf linuxdoc sgml2latex )
( cd usr/bin ; rm -rf nsgmls )
( cd usr/bin ; ln -sf onsgmls nsgmls )
( cd usr/bin ; rm -rf sgml2rtf )
( cd usr/bin ; ln -sf linuxdoc sgml2rtf )
( cd usr/bin ; rm -rf spam )
( cd usr/bin ; ln -sf ospam spam )
( cd usr/bin ; rm -rf sgml2txt )
( cd usr/bin ; ln -sf linuxdoc sgml2txt )
( cd usr/bin ; rm -rf sgml2html )
( cd usr/bin ; ln -sf linuxdoc sgml2html )
( cd usr/bin ; rm -rf sgmlcheck )
( cd usr/bin ; ln -sf linuxdoc sgmlcheck )
( cd usr/bin ; rm -rf sgml2lyx )
( cd usr/bin ; ln -sf linuxdoc sgml2lyx )
( cd usr/bin ; rm -rf jade )
( cd usr/bin ; ln -sf openjade jade )
( cd usr/man/man1 ; rm -rf docbook2rtf.1.gz )
( cd usr/man/man1 ; ln -sf jw.1.gz docbook2rtf.1.gz )
( cd usr/man/man1 ; rm -rf docbook2ps.1.gz )
( cd usr/man/man1 ; ln -sf jw.1.gz docbook2ps.1.gz )
( cd usr/man/man1 ; rm -rf db2dvi.1.gz )
( cd usr/man/man1 ; ln -sf jw.1.gz db2dvi.1.gz )
( cd usr/man/man1 ; rm -rf jade.1.gz )
( cd usr/man/man1 ; ln -sf openjade.1.gz jade.1.gz )
( cd usr/man/man1 ; rm -rf db2ps.1.gz )
( cd usr/man/man1 ; ln -sf jw.1.gz db2ps.1.gz )
( cd usr/man/man1 ; rm -rf db2html.1.gz )
( cd usr/man/man1 ; ln -sf jw.1.gz db2html.1.gz )
( cd usr/man/man1 ; rm -rf docbook2tex.1.gz )
( cd usr/man/man1 ; ln -sf jw.1.gz docbook2tex.1.gz )
( cd usr/man/man1 ; rm -rf docbook2html.1.gz )
( cd usr/man/man1 ; ln -sf jw.1.gz docbook2html.1.gz )
( cd usr/man/man1 ; rm -rf docbook2texi.1.gz )
( cd usr/man/man1 ; ln -sf jw.1.gz docbook2texi.1.gz )
( cd usr/man/man1 ; rm -rf docbook2pdf.1.gz )
( cd usr/man/man1 ; ln -sf jw.1.gz docbook2pdf.1.gz )
( cd usr/man/man1 ; rm -rf docbook2dvi.1.gz )
( cd usr/man/man1 ; ln -sf jw.1.gz docbook2dvi.1.gz )
( cd usr/man/man1 ; rm -rf docbook2man.1.gz )
( cd usr/man/man1 ; ln -sf jw.1.gz docbook2man.1.gz )
( cd usr/man/man1 ; rm -rf db2pdf.1.gz )
( cd usr/man/man1 ; ln -sf jw.1.gz db2pdf.1.gz )
( cd usr/man/man1 ; rm -rf db2rtf.1.gz )
( cd usr/man/man1 ; ln -sf jw.1.gz db2rtf.1.gz )
( cd usr/share/entity-map/0.1.0 ; rm -rf ISOlat1.2l1tr )
( cd usr/share/entity-map/0.1.0 ; ln -sf ISOlat1.2l1b ISOlat1.2l1tr )
( cd usr/share/entity-map/0.1.0 ; rm -rf GFextra.2rtf )
( cd usr/share/entity-map/0.1.0 ; ln -sf GFextra.2ab GFextra.2rtf )
( cd usr/share/entity-map/0.1.0 ; rm -rf ISOlat1.2texi )
( cd usr/share/entity-map/0.1.0 ; ln -sf ISOlat1.2ab ISOlat1.2texi )
( cd usr/share/entity-map/0.1.0 ; rm -rf ISOdia.2rtf )
( cd usr/share/entity-map/0.1.0 ; ln -sf ISOdia.2ab ISOdia.2rtf )
( cd usr/share/entity-map/0.1.0 ; rm -rf ISOlat1.2rtf )
( cd usr/share/entity-map/0.1.0 ; ln -sf ISOlat1.2ab ISOlat1.2rtf )
( cd usr/share/entity-map/0.1.0 ; rm -rf LDextra.2l1tr )
( cd usr/share/entity-map/0.1.0 ; ln -sf LDextra.2tr LDextra.2l1tr )
( cd usr/share/entity-map/0.1.0 ; rm -rf ISOdia.2l1s )
( cd usr/share/entity-map/0.1.0 ; ln -sf ISOdia.2as ISOdia.2l1s )
( cd usr/share/entity-map/0.1.0 ; rm -rf ISOlat2.2l1s )
( cd usr/share/entity-map/0.1.0 ; ln -sf ISOlat2.2as ISOlat2.2l1s )
( cd usr/share/entity-map/0.1.0 ; rm -rf ISOtech.2l1tr )
( cd usr/share/entity-map/0.1.0 ; ln -sf ISOtech.2tr ISOtech.2l1tr )
( cd usr/share/entity-map/0.1.0 ; rm -rf ISOdia.2l1b )
( cd usr/share/entity-map/0.1.0 ; ln -sf ISOdia.2ab ISOdia.2l1b )
( cd usr/share/entity-map/0.1.0 ; rm -rf ISOdia.2texi )
( cd usr/share/entity-map/0.1.0 ; ln -sf ISOdia.2ab ISOdia.2texi )
( cd usr/share/entity-map/0.1.0 ; rm -rf ISOdia.2l1tr )
( cd usr/share/entity-map/0.1.0 ; ln -sf ISOdia.2tr ISOdia.2l1tr )
( cd usr/share/entity-map/0.1.0 ; rm -rf ISOpub.2l1tr )
( cd usr/share/entity-map/0.1.0 ; ln -sf ISOpub.2tr ISOpub.2l1tr )
( cd usr/share/entity-map/0.1.0 ; rm -rf GFextra.2l1b )
( cd usr/share/entity-map/0.1.0 ; ln -sf GFextra.2ab GFextra.2l1b )
( cd usr/share/entity-map/0.1.0 ; rm -rf ISOlat1.2l1s )
( cd usr/share/entity-map/0.1.0 ; ln -sf ISOlat1.2l1b ISOlat1.2l1s )
( cd usr/share/entity-map/0.1.0 ; rm -rf ISOlat2.2l1b )
( cd usr/share/entity-map/0.1.0 ; ln -sf ISOlat2.2ab ISOlat2.2l1b )
( cd usr/share/entity-map/0.1.0 ; rm -rf GFextra.2l1s )
( cd usr/share/entity-map/0.1.0 ; ln -sf GFextra.2as GFextra.2l1s )
( cd usr/share/entity-map/0.1.0 ; rm -rf ISOlat1.2tr )
( cd usr/share/entity-map/0.1.0 ; ln -sf ISOlat1.2ab ISOlat1.2tr )
( cd usr/share/xml/docbook/stylesheet ; rm -rf docbook-xsl )
( cd usr/share/xml/docbook/stylesheet ; ln -sf ../xsl-stylesheets-1.79.1 docbook-xsl )
( cd usr/share/xml/docbook/xsl-stylesheets-1.79.1 ; rm -rf VERSION.xsl )
( cd usr/share/xml/docbook/xsl-stylesheets-1.79.1 ; ln -sf VERSION VERSION.xsl )
( cd usr/share/xml/docbook/xml-dtd-4.5/ent ; rm -rf isogrk4.ent )
( cd usr/share/xml/docbook/xml-dtd-4.5/ent ; ln -sf ../../../../sgml/xml-iso-entities-8879.1986/ISOgrk4.ent isogrk4.ent )
( cd usr/share/linuxdoc-tools/dtd ; rm -rf linuxdoc.dtd )
( cd usr/share/linuxdoc-tools/dtd ; ln -sf linuxdoc96.dtd linuxdoc.dtd )
( cd usr/share/linuxdoc-tools/dtd ; rm -rf linuxdoctr.dtd )
( cd usr/share/linuxdoc-tools/dtd ; ln -sf linuxdoctr96.dtd linuxdoctr.dtd )
( cd usr/share/linuxdoc-tools/mappings/nippon ; rm -rf mapping )
( cd usr/share/linuxdoc-tools/mappings/nippon ; ln -sf ../groff/tr-mapping mapping )
( cd usr/share/linuxdoc-tools/mappings/latin1 ; rm -rf mapping )
( cd usr/share/linuxdoc-tools/mappings/latin1 ; ln -sf ../groff/mapping mapping )
( cd usr/lib64 ; rm -rf libogrove.so )
( cd usr/lib64 ; ln -sf libogrove.so.0.0.1 libogrove.so )
( cd usr/lib64 ; rm -rf libspgrove.so )
( cd usr/lib64 ; ln -sf libospgrove.so libspgrove.so )
( cd usr/lib64 ; rm -rf libosp.so.5 )
( cd usr/lib64 ; ln -sf libosp.so.5.0.0 libosp.so.5 )
( cd usr/lib64 ; rm -rf libstyle.so )
( cd usr/lib64 ; ln -sf libostyle.so libstyle.so )
( cd usr/lib64 ; rm -rf libogrove.so.0 )
( cd usr/lib64 ; ln -sf libogrove.so.0.0.1 libogrove.so.0 )
( cd usr/lib64 ; rm -rf libostyle.so.0 )
( cd usr/lib64 ; ln -sf libostyle.so.0.0.1 libostyle.so.0 )
( cd usr/lib64 ; rm -rf libospgrove.so )
( cd usr/lib64 ; ln -sf libospgrove.so.0.0.1 libospgrove.so )
( cd usr/lib64 ; rm -rf libosp.so )
( cd usr/lib64 ; ln -sf libosp.so.5.0.0 libosp.so )
( cd usr/lib64 ; rm -rf libsp.so )
( cd usr/lib64 ; ln -sf libosp.so libsp.so )
( cd usr/lib64 ; rm -rf libostyle.so )
( cd usr/lib64 ; ln -sf libostyle.so.0.0.1 libostyle.so )
( cd usr/lib64 ; rm -rf libgrove.so )
( cd usr/lib64 ; ln -sf libogrove.so libgrove.so )
( cd usr/lib64 ; rm -rf libospgrove.so.0 )
( cd usr/lib64 ; ln -sf libospgrove.so.0.0.1 libospgrove.so.0 )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf asciidoc.css )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../stylesheets/asciidoc.css asciidoc.css )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf epub-notes.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/epub-notes.txt epub-notes.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf asciidoc-docbook-xsl.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../docbook-xsl/asciidoc-docbook-xsl.txt asciidoc-docbook-xsl.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf userguide.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/asciidoc.txt userguide.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf publishing-ebooks-with-asciidoc.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/publishing-ebooks-with-asciidoc.txt publishing-ebooks-with-asciidoc.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf music-filter.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/music-filter.txt music-filter.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf asciimathml.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/asciimathml.txt asciimathml.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf README.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../README.txt README.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf faq.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/faq.txt faq.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf LaTeXMathML.js )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../javascripts/LaTeXMathML.js LaTeXMathML.js )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf slidy-example.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/slidy-example.txt slidy-example.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf latexmathml.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/latexmathml.txt latexmathml.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf asciidoc.js )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../javascripts/asciidoc.js asciidoc.js )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf CHANGELOG.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../CHANGELOG.txt CHANGELOG.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf ASCIIMathML.js )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../javascripts/ASCIIMathML.js ASCIIMathML.js )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf slidy.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/slidy.txt slidy.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf a2x.1.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/a2x.1.txt a2x.1.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf source-highlight-filter.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/source-highlight-filter.txt source-highlight-filter.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf asciidocapi.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/asciidocapi.txt asciidocapi.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf latex-bugs.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/latex-bugs.txt latex-bugs.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf xhtml11-quirks.css )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../stylesheets/xhtml11-quirks.css xhtml11-quirks.css )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf latex-filter.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/latex-filter.txt latex-filter.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf testasciidoc.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/testasciidoc.txt testasciidoc.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf latex-backend.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/latex-backend.txt latex-backend.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf images )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../images images )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf INSTALL.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../INSTALL.txt INSTALL.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; rm -rf manpage.txt )
( cd usr/doc/asciidoc-8.6.9/examples/website ; ln -sf ../../doc/asciidoc.1.txt manpage.txt )
( cd usr/doc/asciidoc-8.6.9/doc ; rm -rf images )
( cd usr/doc/asciidoc-8.6.9/doc ; ln -sf ../images images )
