The R Project SVN R

Rev

Rev 5081 | Rev 6098 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5081 Rev 5471
Line 34... Line 34...
34
# Default environment file
34
# Default environment file
35
: ${R_ENVIRON="${HOME}/.Renviron"}
35
: ${R_ENVIRON="${HOME}/.Renviron"}
36
USE_R_ENVIRON=true
36
USE_R_ENVIRON=true
37
 
37
 
38
# Argument loop
38
# Argument loop
-
 
39
DBG=
39
while test -n "${1}"; do
40
while test -n "${1}"; do
40
  case ${1} in
41
  case ${1} in
41
    RHOME)
42
    RHOME)
42
      echo ${R_HOME}; exit 0 ;;
43
      echo ${R_HOME}; exit 0 ;;
43
    CMD)
44
    CMD)
Line 45... Line 46...
45
    BATCH|COMPILE|INSTALL|REMOVE|SHLIB)
46
    BATCH|COMPILE|INSTALL|REMOVE|SHLIB)
46
      CMD="$1"; shift; exec sh "${R_HOME}/bin/${CMD}" "${@}" ;;
47
      CMD="$1"; shift; exec sh "${R_HOME}/bin/${CMD}" "${@}" ;;
47
    -g|--gnome)
48
    -g|--gnome)
48
      R_BINARY="R.gnome" ;;
49
      R_BINARY="R.gnome" ;;
49
    -d|--debugger)
50
    -d|--debugger)
50
      dbg="${2}"; shift 2; args="${@}"
51
      DBG="${2}"; shift 2 ;;
51
      if test -n "${args}"; then 
-
 
52
	echo "*** Further command line arguments (\`$args') disregarded"
-
 
53
	echo "*** (maybe use \`run ${args}'  from *inside* ${dbg}"
-
 
54
	echo ""
-
 
55
      fi
-
 
56
      exec ${dbg} ${R_HOME}/bin/${R_BINARY} ;;
-
 
57
    --no-environ)
52
    --no-environ)
58
      USE_R_ENVIRON=false ;;
53
      USE_R_ENVIRON=false ;;
59
    --vanilla)
54
    --vanilla)
60
      ARGS="${ARGS} ${1}"
55
      ARGS="${ARGS} ${1}"
61
      USE_R_ENVIRON=false ;;    
56
      USE_R_ENVIRON=false ;;    
Line 111... Line 106...
111
 
106
 
112
# Startup
107
# Startup
113
if ${USE_R_ENVIRON}; then
108
if ${USE_R_ENVIRON}; then
114
  [ -r ${R_ENVIRON} ] && . ${R_ENVIRON}
109
  [ -r ${R_ENVIRON} ] && . ${R_ENVIRON}
115
fi
110
fi
-
 
111
 
-
 
112
if test -z "${DBG}"; then
116
exec ${R_HOME}/bin/${R_BINARY} @R_BATCHSAVE@ ${ARGS}
113
  exec ${R_HOME}/bin/${R_BINARY} @R_BATCHSAVE@ ${ARGS}
-
 
114
else
-
 
115
  if test -n "${ARGS}"; then
-
 
116
    echo "*** Further command line arguments (\`${ARGS}') disregarded"
-
 
117
    echo "*** (maybe use \`run ${ARGS}' from *inside* ${DBG})"
-
 
118
    echo ""
-
 
119
  fi
-
 
120
  exec ${DBG} ${R_HOME}/bin/${R_BINARY}
-
 
121
fi
117
 
122
 
118
### Local Variables: ***
123
### Local Variables: ***
119
### mode: sh ***
124
### mode: sh ***
120
### sh-indentation: 2 ***
125
### sh-indentation: 2 ***
121
### End: ***
126
### End: ***