docbook-dtds-uninstall.sh revision 7042
7042N/A#!/bin/bash
7042N/A
7042N/A#
7042N/A# docbook-dtds.spec %postun
7042N/A#
7042N/A
7042N/Aexport version=1.0
7042N/Aexport release=51
7042N/Aexport version_list="{3,4}.{0,1}-sgml 4.1.2-xml 4.{2,3,4,5}-{sgml,xml}"
7042N/A
7042N/Acatcmd='/usr/bin/xmlcatalog --noout'
7042N/Axmlcatalog=/usr/share/sgml/docbook/xmlcatalog
7042N/Aentities="
7042N/Aent/iso-pub.ent
7042N/Aent/iso-grk1.ent
7042N/Adbpoolx.mod
7042N/Aent/iso-box.ent
7042N/Adocbookx.dtd
7042N/Aent/iso-grk3.ent
7042N/Aent/iso-amsn.ent
7042N/Aent/iso-num.ent
7042N/Adbcentx.mod
7042N/Aent/iso-grk4.ent
7042N/Adbnotnx.mod
7042N/Aent/iso-dia.ent
7042N/Aent/iso-grk2.ent
7042N/Adbgenent.mod
7042N/Adbhierx.mod
7042N/Aent/iso-amsa.ent
7042N/Aent/iso-amso.ent
7042N/Aent/iso-cyr1.ent
7042N/Aent/iso-tech.ent
7042N/Aent/iso-amsc.ent
7042N/Asoextblx.dtd
7042N/Acalstblx.dtd
7042N/Aent/iso-lat1.ent
7042N/Aent/iso-amsb.ent
7042N/Aent/iso-lat2.ent
7042N/Aent/iso-amsr.ent
7042N/Aent/iso-cyr2.ent
7042N/A"
7042N/Aeval set ${version_list}
7042N/Afor dir
7042N/Ado
7042N/A fmt=${dir#*-} ver=${dir%%-*} vvr=$ver-${version}-${release}
7042N/A sgmldir=/usr/share/sgml/docbook/$fmt-dtd-$vvr
7042N/A ## SGML catalog
7042N/A # Update the centralized catalog corresponding to this version of the DTD
7042N/A $catcmd --sgml --del /etc/sgml/catalog /etc/sgml/$fmt-docbook-$vvr.cat
7042N/A rm -f /etc/sgml/$fmt-docbook-$vvr.cat
7042N/A ## XML catalog
7042N/A if [ $fmt = xml -a -w $xmlcatalog ]; then
7042N/A for f in $entities; do
7042N/A case $ver in 4.[45]) f=${f/-/} ;; esac
7042N/A $catcmd --del $sgmldir/$f $xmlcatalog
7042N/A done
7042N/A $catcmd --del $sgmldir $xmlcatalog
7042N/A fi
7042N/Adone
7042N/A
7042N/A# See the comment attached to this command in the %%post scriptlet.
7042N/A/usr/gnu/bin/sed -ni '
7042N/A /xml-docbook/ H
7042N/A /xml-docbook/ !p
7042N/A $ {
7042N/A g
7042N/A s/^\n//p
7042N/A }
7042N/A ' /etc/sgml/catalog