R-beta: multiple binary types

Gregory R. Warnes warnes at biostat.washington.edu
Thu Apr 24 04:11:51 CEST 1997


I've modified the "$RHOME/bin/R" and "$RHOME/cmd/filename" so that you 
can use the same directories for multiple machines.  That is, machines 
running various flavors of UNIX can access the same directories.

The modified structure adds the directories

$RHOME/bin/$OSTYPE/
$RHOME/lib/$OSTYPE/

to hold the machine specific binaries.

For instance, here the $RHOME directory contains two subdirectories,

$RHOME/bin/solaris/
$RHOME/bin/sunos4/

which each hold the appropriate R.binary file.  

These two modified functions assume that the environment variable $OSTYPE 
is appropriately set, as is done automatically by the shell tcsh.  If it 
is not set, the directory names collapse to the original values,
	$RHOME/bin/ and $RHOME/lib/

To use them, create the approprate directories and place the correct 
binaries therein. ( Note that the makefiles will not do this 
automatically!)  Then replace $RHOME/bin/R and $RHOME/cmd/filename with 
the modified ones.




-------------------------------------------------------------------------------
    Gregory R. Warnes          | It is high time that the ideal of success
warnes at biostat.washington.edu  |  be replaced by the ideal of service.
                               |                       Albert Einstein
-------------------------------------------------------------------------------
-------------- next part --------------
#!/bin/sh
# Shell wrapper for R executable.
# Just sets a few environment items

RHOME=/biostat/server0/src/biostat/gnu/R/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/$OSTYPE/R.binary $*
-------------- next part --------------
#!/bin/sh

if [ "$1" =  "lib" ]
then
	file=$RHOME/$1/$OSTYPE/$2
else
	file=$RHOME/$1/$2
fi

if [ -r $file ]
then
	echo $file
else
	echo
fi


More information about the R-help mailing list