[Genabel-commits] r1508 - pkg/GenABEL-general/scripts
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Dec 28 00:29:14 CET 2013
Author: lckarssen
Date: 2013-12-28 00:29:13 +0100 (Sat, 28 Dec 2013)
New Revision: 1508
Modified:
pkg/GenABEL-general/scripts/makedistrib_GenABEL.sh
Log:
Some finetuning in the makedistrib_GenABEL.sh script:
- Exit on errors (makes finding errors easier)
- Fixed a few typos (--as-cran instead of --ad-cran)
- Don't use the user's default R_LIBS directory to install packages in, use one in /tmp instead
- No need for an intermediate file when installing the prerequisite packages, we can solve that with a slightly modified way of using a HERE-document.
Modified: pkg/GenABEL-general/scripts/makedistrib_GenABEL.sh
===================================================================
--- pkg/GenABEL-general/scripts/makedistrib_GenABEL.sh 2013-12-27 21:00:05 UTC (rev 1507)
+++ pkg/GenABEL-general/scripts/makedistrib_GenABEL.sh 2013-12-27 23:29:13 UTC (rev 1508)
@@ -1,5 +1,8 @@
#!/bin/bash
+# Exit this script on error
+set -e
+
installation_dir="GenABEL_version_for_submission"
@@ -28,32 +31,31 @@
CRAN_repo="\"http://cran.xl-mirror.nl\""
-cat <<EOF > install_fresh_R_packages.R
-install.packages("roxygen2", repos=$CRAN_repo)
-install.packages("mvtnorm", repos=$CRAN_repo)
-install.packages("methods", repos=$CRAN_repo)
-install.packages("MASS", repos=$CRAN_repo)
-install.packages("utils", repos=$CRAN_repo)
+# In order not to mess with the current user's R library directory we
+# set one in /tmp. Most Linux distributions will remove the
+# directories in /tmp on reboot or after several days.
+export R_LIBS=/tmp/Rlibs-GenABEL-build
-source("http://bioconductor.org/biocLite.R")
-biocLite("qvalue")
+R --vanilla --no-save <<EOF
+install.packages("roxygen2", repos=$CRAN_repo)
+install.packages("mvtnorm", repos=$CRAN_repo)
+install.packages("methods", repos=$CRAN_repo)
+install.packages("MASS", repos=$CRAN_repo)
+install.packages("utils", repos=$CRAN_repo)
-install.packages("genetics", repos=$CRAN_repo)
-install.packages("haplo.stats", repos=$CRAN_repo)
-install.packages("hglm", repos=$CRAN_repo)
-install.packages("PredictABEL", repos=$CRAN_repo)
-install.packages("VariABEL", repos=$CRAN_repo)
-install.packages("bigRR", repos=$CRAN_repo)
+source("http://bioconductor.org/biocLite.R")
+biocLite("qvalue")
+
+install.packages("genetics", repos=$CRAN_repo)
+install.packages("haplo.stats", repos=$CRAN_repo)
+install.packages("hglm", repos=$CRAN_repo)
+install.packages("PredictABEL", repos=$CRAN_repo)
+install.packages("VariABEL", repos=$CRAN_repo)
+install.packages("bigRR", repos=$CRAN_repo)
EOF
-R -f install_fresh_R_packages.R
-rm -rf install_fresh_R_packages.R
-
-
-
-
echo
echo Build and install packages...
@@ -108,7 +110,7 @@
cd ..
# end cleanup
-#R CMD check --ad-cran GenABEL
+#R CMD check --as-cran GenABEL
R CMD build GenABEL
R CMD INSTALL GenABEL_*tar.gz
@@ -133,7 +135,7 @@
#echo Copying GenABEL_general/GenABEL-tutorial.pdf in GenABEL/inst/doc/...
cp GenABEL_general/GenABEL-tutorial.pdf GenABEL/inst/doc/
echo Building the GenABEL...
-R CMD check --ad-cran GenABEL
+R CMD check --as-cran GenABEL
R CMD build GenABEL
mkdir GenABEL_DISTRIBUTIVE_IS_HERE
cp GenABEL_*tar.gz GenABEL_DISTRIBUTIVE_IS_HERE
@@ -150,4 +152,3 @@
# and do not forget to run R CMD check --as-cran!
-
More information about the Genabel-commits
mailing list