The R Project SVN R

Rev

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