#!/bin/sh -e
#
# update-texmf-config
# script used in maintainer script for updating the config files
# updmap.cfg, language.dat, fmtutil.cnf, and calling the respective
# triggers to allow tex-common trigger action to be run.
#
# Copyright (C) 2009 Norbert Preining
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 dated June, 1991.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to the
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA  02110-1301 USA.

DOLANGUAGE=off
DOUPDMAP=off

while [ $# -ne 0 ]; do
  case $1 in
    language)
      DOLANGUAGE=on
      shift;;
    updmap)
      DOUPDMAP=on
      shift;;
    *)
      echo "unknown option: $1"
      exit 1
      ;;
  esac
done

 
if [ $DOLANGUAGE = on ] ; then
  # done in the trigger action of tex-common
  # update-language
  dpkg-trigger texmf-language
fi
if [ $DOUPDMAP = on ] ; then
  # done in the trigger action of tex-common
  # update-updmap
  dpkg-trigger texmf-updmap
fi

# vim:set expandtab tabstop=2: #
