The R Project SVN R

Rev

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

Rev 19969 Rev 26075
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_HOME}/share/perl:${PERL5LIB}"
16
  PERL5LIB="${R_HOME}/share/perl:${PERL5LIB}"
17
  export PERL5LIB
17
  export PERL5LIB
18
else
18
else
19
  PERLLIB="${R_HOME}/share/perl:${PERLLIB}"
19
  PERLLIB="${R_HOME}/share/perl:${PERLLIB}"
20
  export PERLLIB
20
  export PERLLIB
21
fi
21
fi
22
 
22
 
-
 
23
## Add 'share/texmf' to TeX's input search path.
-
 
24
TEXINPUTS=".:${R_HOME}/share/texmf:${TEXINPUTS}"
-
 
25
export TEXINPUTS
-
 
26
 
23
. ${R_HOME}/etc/Renviron
27
. ${R_HOME}/etc/Renviron
24
export `sed 's/^ *#.*//; s/^\(.*\)=.*/\1/' ${R_HOME}/etc/Renviron`
28
export `sed 's/^ *#.*//; s/^\(.*\)=.*/\1/' ${R_HOME}/etc/Renviron`
25
 
29
 
26
case "${1}" in
30
case "${1}" in
27
  perl)
31
  perl)
28
    cmd="${PERL}" ;;
32
    cmd="${PERL}" ;;
29
  awk)
33
  awk)
30
    cmd="${AWK}"  ;;
34
    cmd="${AWK}"  ;;
31
  *)
35
  *)
32
    if test -x "${R_HOME}/bin/${1}"; then
36
    if test -x "${R_HOME}/bin/${1}"; then
33
      cmd="${R_HOME}/bin/${1}"
37
      cmd="${R_HOME}/bin/${1}"
34
    else
38
    else
35
      cmd="${1}"
39
      cmd="${1}"
36
    fi
40
    fi
37
    ;;
41
    ;;
38
esac
42
esac
39
shift
43
shift
40
 
44
 
41
exec "${cmd}" "${@}"
45
exec "${cmd}" "${@}"
42
 
46
 
43
### Local Variables: ***
47
### Local Variables: ***
44
### mode: sh ***
48
### mode: sh ***
45
### sh-indentation: 2 ***
49
### sh-indentation: 2 ***
46
### End: ***
50
### End: ***