The R Project SVN R

Rev

Rev 34044 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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