[Genabel-commits] r1941 - pkg/GenABEL-general/distrib_scripts
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Mar 30 23:32:43 CEST 2015
Author: lckarssen
Date: 2015-03-30 23:32:43 +0200 (Mon, 30 Mar 2015)
New Revision: 1941
Modified:
pkg/GenABEL-general/distrib_scripts/distrib_support_functions.sh
Log:
In the support functions for the makedistrib scripts:
- Make a separate variable for the R binary (${R}), so that it's easy to use another R binary (e.g. R and R-devel).
- Instead of changing the env var ${R_LIBS} change ${R_LIBS_USER} when installing missing dependencies. ${R_LIBS} is for system-wide packages, we shouldn't touch that path or we may end up missing basic packages like MASS, Matrix, foreing, etc. (Yes, this happenedto me, that's why I changed it :-)).
Modified: pkg/GenABEL-general/distrib_scripts/distrib_support_functions.sh
===================================================================
--- pkg/GenABEL-general/distrib_scripts/distrib_support_functions.sh 2015-03-30 20:59:16 UTC (rev 1940)
+++ pkg/GenABEL-general/distrib_scripts/distrib_support_functions.sh 2015-03-30 21:32:43 UTC (rev 1941)
@@ -9,7 +9,8 @@
#######################################################################
init_buildenv () {
CRAN_repo='"http://cran-mirror.cs.uu.nl"'
- RCMD="R --vanilla CMD"
+ R=R
+ RCMD="${R} --vanilla CMD"
}
@@ -20,18 +21,18 @@
# 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-$PKG-build
- mkdir -p $R_LIBS
+ export R_LIBS_USER=/tmp/Rlibs-$PKG-build
+ mkdir -p ${R_LIBS_USER}
echo
echo "--------------------------------------------------"
echo "Installing missing R packages from CRAN and Bioconductor" \
- "into the directory $R_LIBS"
+ "into the directory ${R_LIBS_USER}"
echo "--------------------------------------------------"
deps=$($scriptdir/getdeps.awk $PKG/DESCRIPTION)
- R --vanilla --no-save --slave <<EOF
+ ${R} --vanilla --no-save --slave <<EOF
deplist=c($deps)
new.packages <- deplist[!(deplist %in% installed.packages()[,"Package"])]
@@ -70,7 +71,7 @@
echo "--------------------------------------------------"
PKG_VERSION=$(grep Version: ${PKG}/DESCRIPTION | cut -d " " -f2)
- R CMD check --as-cran ${PKG}_${PKG_VERSION}.tar.gz
+ ${R} CMD check --as-cran ${PKG}_${PKG_VERSION}.tar.gz
if sed -e 's/feasibility ... WARNING/feasibility ... WRNNG/' \
-e 's/^WARNING/WRNNG/' $PKG.Rcheck/00check.log | \
grep -qE "NOTE|WARNING|ERROR"; then
More information about the Genabel-commits
mailing list