#!/bin/sh

scriptname="$0"
step="$1"
keywords="$2"
pkglist="$3"

# Source in the standard functions library, ccsSetup.sh
. ccsSetup.sh

doPostExport() {
  [ -x /usr/bin/doctool ] && /usr/bin/doctool --add OSdoc/GhostscriptDoc.desktop
  [ -x /usr/man/bin/makewhatis ] && {
    /usr/man/bin/makewhatis /usr/man/man1
  }
}

doPreUnExport() {
  [ -x /usr/bin/doctool ] && {
    /usr/bin/doctool --remove OSdoc/GhostscriptDoc.desktop
  }
}

doPostUnExport() {
  [ -x /usr/man/bin/makewhatis ] && {
    /usr/man/bin/makewhatis /usr/man/man1
  }
}

ccs_return_value=0

case "$step" in
        POST_EXPORT)  doPostExport ;;
        PRE_UNEXPORT) doPreUnExport ;;
        POST_UNEXPORT) doPostUnExport ;;
esac

exit $ccs_return_value

