Rev 17397 | Blame | Last modification | View Log | Download | RSS feed
# needs save lib pkg R_HOMElib=$2pkg=$3R_HOME=$4case $1 inCHECK) if test -r install.R; then R_SAVE_IMAGE=true; else R_SAVE_IMAGE=false; fi;;*) R_SAVE_IMAGE=$1;;esacexport R_SAVE_IMAGEif ${R_SAVE_IMAGE}; thenecho " save image"save_image_defaults="list(compress=TRUE, safe=FALSE)"(echo "options(save.image.defaults=${save_image_defaults})"; \if test -s R_PROFILE.R; then cat R_PROFILE.R; fi; \echo "invisible(.libPaths(c(\"${lib}\", .libPaths())))"; \cat ${lib}/${pkg}/R/${pkg}) | \${R_HOME}/bin/Rterm --slave --save --no-site-file --no-init-file \|| (echo "Execution of package source for ${pkg} failed"; exit 1)mv .RData ${lib}/${pkg}/R/all.rdamv ${lib}/${pkg}/R/${pkg} ${lib}/${pkg}/R/${pkg}.Rcat ${R_HOME}/share/R/firstlib.R > ${lib}/${pkg}/R/${pkg}## if install.R is non-empty, arrange to evaluate the R code it## contains after the package source (maybe for some kind of## cleanup).if test -s install.R; thencat install.R >> ${lib}/${pkg}/R/${pkg}fifi