The R Project SVN R

Rev

Rev 31301 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 31301 Rev 37712
Line 4... Line 4...
4
R_HOME=$4
4
R_HOME=$4
5
BUILD=$5
5
BUILD=$5
6
RX_EXE=$6
6
RX_EXE=$6
7
DPKG=$7
7
DPKG=$7
8
 
8
 
9
case $1 in
-
 
10
    CHECK|'') if test -r install.R; then R_SAVE_IMAGE=true; else R_SAVE_IMAGE=false; fi;;
-
 
11
    *) R_SAVE_IMAGE=$1;;
9
R_SAVE_IMAGE=$1
12
esac
-
 
13
export R_SAVE_IMAGE
10
export R_SAVE_IMAGE
-
 
11
if test -r install.R; then 
-
 
12
    echo "WARNING: use of install.R is no longer supported"
-
 
13
fi
-
 
14
if test -r R_PROFILE.R; then 
-
 
15
    echo "WARNING: use of R_PROFILE.R is no longer supported"
-
 
16
fi
14
 
17
 
15
## R_START_PACKAGES is set to NULL during bootstrapping
18
## R_START_PACKAGES is set to NULL during bootstrapping
16
R_DEFAULT_PACKAGES=${R_START_PACKAGES}
19
R_DEFAULT_PACKAGES=${R_START_PACKAGES}
17
export R_DEFAULT_PACKAGES
20
export R_DEFAULT_PACKAGES
18
if test "x${BUILD}" = "xCROSS"; then
21
if test "x${BUILD}" = "xCROSS"; then
Line 49... Line 52...
49
        code_cmd="cat ${code_file}"
52
        code_cmd="cat ${code_file}"
50
        loader_file=firstlib.R
53
        loader_file=firstlib.R
51
        R_SAVE_EXE="--save"
54
        R_SAVE_EXE="--save"
52
    fi
55
    fi
53
    (echo "options(save.image.defaults=${save_image_defaults})"; \
56
    (echo "options(save.image.defaults=${save_image_defaults})"; \
54
      if test -s R_PROFILE.R; then cat R_PROFILE.R; fi; \
-
 
55
      echo "invisible(.libPaths(c(.Library,\"${lib}\",.libPaths()))); .getRequiredPackages()"; \
57
      echo "invisible(.libPaths(c(.Library,\"${lib}\",.libPaths()))); .getRequiredPackages()"; \
56
      ${code_cmd}) | ${R_EXE} ${R_SAVE_EXE}
58
      ${code_cmd}) | ${R_EXE} ${R_SAVE_EXE}
57
    if test ${?} -ne 0; then
59
    if test ${?} -ne 0; then
58
      echo "execution of package source for '${pkg}' failed"
60
      echo "execution of package source for '${pkg}' failed"
59
      exit 1
61
      exit 1
Line 66... Line 68...
66
    fi
68
    fi
67
    ## we used to install the dumped code but this seems a waste of space
69
    ## we used to install the dumped code but this seems a waste of space
68
    rm "${code_file}"
70
    rm "${code_file}"
69
    # mv "${code_file}" "${code_file}.R"
71
    # mv "${code_file}" "${code_file}.R"
70
    cat "${R_HOME}/share/R/${loader_file}" > "${code_file}"
72
    cat "${R_HOME}/share/R/${loader_file}" > "${code_file}"
71
    ## if install.R is non-empty, arrange to evaluate the R code it
-
 
72
    ## contains after the package source (maybe for some kind of
-
 
73
    ## cleanup).
-
 
74
    if test -s install.R; then
-
 
75
      cat install.R >> ${lib}/${pkg}/R/${pkg}
-
 
76
    fi
-
 
77
fi
73
fi