Commit 3cf9bbc2 authored by julien veyssier's avatar julien veyssier
Browse files

pass NBCORES bash script param to R scripts

parent 078198b6
......@@ -461,7 +461,7 @@ echo
printLeftPurple "Generation of depends.R ... started at `date '+%H:%M:%S'` ... "
# generate depends.R
echo 'if (!"tools" %in% installed.packages(lib.loc=Sys.getenv("R_LIBS_USER"))) {
install.packages("tools",repos=c("'$DEFAULT_REPOSITORY'"), lib=Sys.getenv("R_LIBS_USER"), dependencies=c("Depends", "Imports", "LinkingTo", "Suggests"), Ncpus=7)
install.packages("tools",repos=c("'$DEFAULT_REPOSITORY'"), lib=Sys.getenv("R_LIBS_USER"), dependencies=c("Depends", "Imports", "LinkingTo", "Suggests"), Ncpus=$NBCORES)
}
old <- getOption("defaultPackages"); r <- getOption("repos")
......@@ -518,7 +518,7 @@ if [ -n "$R_LIBS_USER" ]; then
R_LIBS_USER_PARAM=", lib=Sys.getenv(\"R_LIBS_USER\")"
fi
echo '
install.packages("'$PACKAGE_TO_TEST'"'$REPO_R_PARAM''$R_LIBS_USER_PARAM', dependencies=c("Depends", "Imports", "LinkingTo", "Suggests"), Ncpus=7)
install.packages("'$PACKAGE_TO_TEST'"'$REPO_R_PARAM''$R_LIBS_USER_PARAM', dependencies=c("Depends", "Imports", "LinkingTo", "Suggests"), Ncpus=$NBCORES)
ff <- file("pkg.version", open = "w")
cat( paste(sep=",",packageVersion("'$PACKAGE_TO_TEST'")), file=ff)
......@@ -556,7 +556,7 @@ if [[ "$SKIPINSTALLFLAG" == "0" ]]; then
update.packages(lib.loc=Sys.getenv("R_LIBS_USER"), repos=c("'$DEFAULT_REPOSITORY'"),ask=FALSE)
if (!"XML" %in% installed.packages(lib.loc=Sys.getenv("R_LIBS_USER"))) {
install.packages("XML",repos=c("'$DEFAULT_REPOSITORY'"), lib=Sys.getenv("R_LIBS_USER"), dependencies=c("Depends", "Imports", "LinkingTo", "Suggests"), Ncpus=7)
install.packages("XML",repos=c("'$DEFAULT_REPOSITORY'"), lib=Sys.getenv("R_LIBS_USER"), dependencies=c("Depends", "Imports", "LinkingTo", "Suggests"), Ncpus=$NBCORES)
}
source("http://bioconductor.org/biocLite.R")
biocLite("Biostrings", ask=FALSE, lib.loc=Sys.getenv("R_LIBS_USER"), suppressUpdates=TRUE)
......@@ -602,7 +602,7 @@ if [[ "$SKIPINSTALLFLAG" == "0" ]]; then
echo 'chooseBioCmirror(ind=3)
setRepositories(ind=c(1, 2, 5, 6))
if (!"'$pname'" %in% installed.packages(lib.loc=Sys.getenv("R_LIBS_USER"))) {
install.packages("'$pname'",repos=c("'$DEFAULT_REPOSITORY'"), lib=Sys.getenv("R_LIBS_USER"), dependencies=c("Depends", "Imports", "LinkingTo", "Suggests"), Ncpus=7)
install.packages("'$pname'",repos=c("'$DEFAULT_REPOSITORY'"), lib=Sys.getenv("R_LIBS_USER"), dependencies=c("Depends", "Imports", "LinkingTo", "Suggests"), Ncpus=$NBCORES)
}
' > ${pname}_install.R
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment