diff options
author | Britney Fransen <brfransen@gmail.com> | 2020-07-06 02:27:27 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2020-07-06 02:27:27 (GMT) |
commit | 0b98e2bf564833a70ed74fab6c6771b7d9d096d0 (patch) | |
tree | ee3f506296cb1fba0b66074615bad559efb96af8 /abs/extra/docbook-sgml/docbook-sgml.install | |
parent | addaf6b7e7ea8bc9649e9c15a57b6a1144516971 (diff) | |
download | linhes_pkgbuild-0b98e2bf564833a70ed74fab6c6771b7d9d096d0.zip linhes_pkgbuild-0b98e2bf564833a70ed74fab6c6771b7d9d096d0.tar.gz linhes_pkgbuild-0b98e2bf564833a70ed74fab6c6771b7d9d096d0.tar.bz2 |
docbook-sgml: dep of valgrind
Diffstat (limited to 'abs/extra/docbook-sgml/docbook-sgml.install')
-rw-r--r-- | abs/extra/docbook-sgml/docbook-sgml.install | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/abs/extra/docbook-sgml/docbook-sgml.install b/abs/extra/docbook-sgml/docbook-sgml.install new file mode 100644 index 0000000..61c78e7 --- /dev/null +++ b/abs/extra/docbook-sgml/docbook-sgml.install @@ -0,0 +1,55 @@ +# arg 1: the new package version +pre_install() { + /bin/true +} + +# arg 1: the new package version +post_install() { + add_catalog "${1%-*}" +} + +# arg 1: the new package version +# arg 2: the old package version +pre_upgrade() { + remove_catalog "${2%-*}" +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + add_catalog "${1%-*}" +} + +# arg 1: the old package version +pre_remove() { + remove_catalog "${1%-*}" +} + +# arg 1: the old package version +post_remove() { + /bin/true +} + + +add_catalog() { + install-catalog --add /etc/sgml/sgml-docbook-dtd-$1.cat \ + /usr/share/sgml/docbook-sgml-$1/catalog > /dev/null 2>&1 + + install-catalog --add /etc/sgml/sgml-docbook-dtd-$1.cat \ + /etc/sgml/sgml-docbook.cat > /dev/null 2>&1 +} + +remove_catalog() { + install-catalog --remove /etc/sgml/sgml-docbook-dtd-$1.cat \ + /usr/share/sgml/docbook-sgml-$1/catalog > /dev/null 2>&1 + + install-catalog --remove /etc/sgml/sgml-docbook-dtd-$1.cat \ + /etc/sgml/sgml-docbook.cat > /dev/null 2>&1 +} + +op=$1 +shift +$op "$@" + +# vim:set syntax=sh ts=4 sw=4 noet: + |