#!/bin/sh
#
# postinst script for the Debian GNU/Linux r-base package
# This version written by Douglas Bates <bates@stat.wisc.edu>

set -e
    
if [ -x /usr/bin/update-menus ] ; then update-menus ; fi

case "$1" in
    configure)
	if [ -x /usr/bin/paperconf ]
	then
	    perl -pi -e \
	    '$P=`/usr/bin/paperconf`,chop $P,s:a4:$P: if /{R_PAPERSIZE/' /usr/bin/R
	fi
    ;;
    abort-upgrade|abort-remove|abort-deconfigure)
    ;;
    *)
	echo "postinst called with unknown argument \`$1'" >&2
    ;;
esac
