The R Project SVN R

Rev

Rev 37300 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11483 hornik 1
#! /bin/sh
2
#
3
# ${R_HOME}/bin/Rcmd
4
 
5
## Shell script wrapper for all R CMD commands.
11515 hornik 6
## For internal use only.
11483 hornik 7
 
8
R_CMD="${R_HOME}/bin/Rcmd"
9
export R_CMD
10
 
14330 hornik 11
R_OSTYPE="unix"
12
export R_OSTYPE
13
 
26075 hornik 14
## Add 'share/perl' to the perl library path.
11483 hornik 15
if test -n "${PERL5LIB}"; then
34044 ripley 16
  PERL5LIB="${R_SHARE_DIR}/perl:${PERL5LIB}"
11483 hornik 17
  export PERL5LIB
18
else
34044 ripley 19
  PERLLIB="${R_SHARE_DIR}/perl:${PERLLIB}"
11483 hornik 20
  export PERLLIB
21
fi
22
 
26075 hornik 23
## Add 'share/texmf' to TeX's input search path.
34044 ripley 24
TEXINPUTS=".:${R_SHARE_DIR}/texmf:${TEXINPUTS}"
26075 hornik 25
export TEXINPUTS
26
 
37300 ripley 27
. "${R_HOME}/etc${R_ARCH}/Renviron"
28
export `sed 's/^ *#.*//; s/^\(.*\)=.*/\1/' "${R_HOME}/etc${R_ARCH}/Renviron"`
11483 hornik 29
 
12256 pd 30
case "${1}" in
31
  perl)
19969 hornik 32
    cmd="${PERL}" ;;
12256 pd 33
  awk)
19969 hornik 34
    cmd="${AWK}"  ;;
12256 pd 35
  *)
19969 hornik 36
    if test -x "${R_HOME}/bin/${1}"; then
37
      cmd="${R_HOME}/bin/${1}"
38
    else
39
      cmd="${1}"
40
    fi
12256 pd 41
    ;;
42
esac
19969 hornik 43
shift
11483 hornik 44
 
19969 hornik 45
exec "${cmd}" "${@}"
46
 
11483 hornik 47
### Local Variables: ***
48
### mode: sh ***
49
### sh-indentation: 2 ***
50
### End: ***