#!/bin/sh
# Maintainer script hooks for openoffice.org.
#
# Maintainers of openoffice.org add-ons may add their own scripts to these directories:
#
#   /usr/share/openoffice.org-debian-files/hooks/preinst.d
#   /usr/share/openoffice.org-debian-files/hooks/postinst.d
#   /usr/share/openoffice.org-debian-files/hooks/prerm.d
#   /usr/share/openoffice.org-debian-files/hooks/postrm.d
#
# Each component of openoffice.org calls the script as follows:
#
#  script <packagename> [args]
#
# [args] are standard maintainer script arguments as defined by debian policy.

PATH=/sbin:/bin:/usr/sbin:/usr/bin

[ -n "$1" ] || exit 0
HOOKDIR="/usr/share/openoffice.org-debian-files/hooks/${1}.d"

command -v run-parts >/dev/null 2>&1 || exit 0
[ -d "$HOOKDIR" ] || exit 0

run-parts --arg="${2}" --arg="${3}" --arg="${4}" --arg="${5}" "$HOOKDIR"

