Rev 16029 | 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"if test -s "R_PROFILE.R"; then trueelseecho "options(echo=FALSE)" > R_PROFILE.RfiR_PROFILE=./R_PROFILE.Rexport R_PROFILE(echo " .lib.loc <- c(\"${lib}\", .lib.loc)";cat ${lib}/${pkg}/R/${pkg};echo "rm(.lib.loc)") | ${R_HOME}/bin/Rterm --save --silent \|| (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