The R Project SVN R

Rev

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

Rev Author Line No. Line
46821 ripley 1
#!@R_SHELL@
11483 hornik 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
 
76762 hornik 8
test ${#} -eq 0 && exec "${R_HOME}/bin/R" --help
9
 
11483 hornik 10
R_CMD="${R_HOME}/bin/Rcmd"
11
export R_CMD
12
 
47522 ripley 13
R_VERSION=@PACKAGE_VERSION@
14
export R_VERSION
15
 
14330 hornik 16
R_OSTYPE="unix"
17
export R_OSTYPE
18
 
52256 ripley 19
## Append 'share/texmf/...' to TeX's input search path.
52478 ripley 20
if test -z "${TEXINPUTS}"; then
52256 ripley 21
  TEXINPUTS=".:${R_SHARE_DIR}/texmf/tex/latex:"
45325 ripley 22
else
52256 ripley 23
  TEXINPUTS=".:${TEXINPUTS}:${R_SHARE_DIR}/texmf/tex/latex:"
45325 ripley 24
fi
52480 ripley 25
export TEXINPUTS
52993 hornik 26
if test -z "${BIBINPUTS}"; then
27
  BIBINPUTS=".:${R_SHARE_DIR}/texmf/bibtex/bib:"
28
else
29
  BIBINPUTS=".:${BIBINPUTS}:${R_SHARE_DIR}/texmf/bibtex/bib:"
30
fi
31
export BIBINPUTS
52478 ripley 32
if test -z "${BSTINPUTS}"; then
52256 ripley 33
  BSTINPUTS=".:${R_SHARE_DIR}/texmf/bibtex/bst:"
34
else
35
  BSTINPUTS=".:${BSTINPUTS}:${R_SHARE_DIR}/texmf/bibtex/bst:"
36
fi
37
export BSTINPUTS
26075 hornik 38
 
37300 ripley 39
. "${R_HOME}/etc${R_ARCH}/Renviron"
76496 hornik 40
export `sed 's/^ *#.*//; s/^\([^=]*\)=.*/\1/' "${R_HOME}/etc${R_ARCH}/Renviron"`
11483 hornik 41
 
49398 ripley 42
extra=
12256 pd 43
case "${1}" in
49398 ripley 44
## this was a separate command prior to 2.10.0
45
  Rd2txt)
46
    cmd="${R_HOME}/bin/Rdconv"
47
    extra="-t txt"
48
    ;;
57136 ripley 49
## removed in 2.15.0
50
  Rd2dvi)
51
    echo "R CMD Rd2dvi is defunct: use Rd2pdf instead"
52
    exit 1
49400 ripley 53
    ;;
12256 pd 54
  *)
19969 hornik 55
    if test -x "${R_HOME}/bin/${1}"; then
56
      cmd="${R_HOME}/bin/${1}"
57
    else
58
      cmd="${1}"
59
    fi
12256 pd 60
    ;;
61
esac
19969 hornik 62
shift
11483 hornik 63
 
71002 ripley 64
exec "${cmd}" ${extra} "${@}"
19969 hornik 65
 
11483 hornik 66
### Local Variables: ***
67
### mode: sh ***
68
### sh-indentation: 2 ***
69
### End: ***