#!/bin/sh
# Shell wrapper for R executable.
# Just sets a few environment items

RHOME=/usr/local/gnu/R-0.49
export RHOME

if [ "$1" = "SHLIB" ]
then
	shift
	exec sh $RHOME/etc/SHLIB $*
fi

if [ "$1" = "COMPILE" ]
then
	shift
	exec sh $RHOME/etc/COMPILE $*
fi

if [ "$1" = -xxgdb ]
then
	shift
	DEBUGGER=xxgdb
fi

# Default Printer Paper Size
# Choose one of the following
# R_PAPERSIZE="a4"
# R_PAPERSIZE="letter"
# R_PAPERSIZE="none"
R_PAPERSIZE=a4
export R_PAPERSIZE

# Default Print Command
# Choose one of the following
# R_PRINTCMD="lpr"
# R_PRINTCMD="lp"
R_PRINTCMD=lpr
export R_PRINTCMD

exec $DEBUGGER $RHOME/bin/R.binary $*
