[Genabel-commits] r1782 - pkg/GenABEL-general/distrib_scripts
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jul 30 23:24:11 CEST 2014
Author: lckarssen
Date: 2014-07-30 23:24:10 +0200 (Wed, 30 Jul 2014)
New Revision: 1782
Modified:
pkg/GenABEL-general/distrib_scripts/makedistrib_DatABEL.sh
pkg/GenABEL-general/distrib_scripts/makedistrib_VariABEL.sh
Log:
- makedistrib_VariABEL.sh: Minor improvement (use of a variable instead of repeating the SVNBASE 3x)
- makedistrib_DatABEL.sh: Updated the script to use functions in distrib_support_functions.sh
Modified: pkg/GenABEL-general/distrib_scripts/makedistrib_DatABEL.sh
===================================================================
--- pkg/GenABEL-general/distrib_scripts/makedistrib_DatABEL.sh 2014-07-30 21:13:06 UTC (rev 1781)
+++ pkg/GenABEL-general/distrib_scripts/makedistrib_DatABEL.sh 2014-07-30 21:24:10 UTC (rev 1782)
@@ -13,15 +13,18 @@
# time if you're expecting trouble)
PKG=DatABEL
-CRAN_repo='"http://cran-mirror.cs.uu.nl"'
-# Exit on errors
+# Exit on errors and when encountering uninitialised variables
set -e
+set -u
# Find the directory where this script (and others it depends on) are
# located
scriptdir=$(dirname $0)
+source $scriptdir/distrib_support_functions.sh
+init_buildenv
+
# Parse command line options
NOCHECKOUT=false
CRANCHECK=true
@@ -63,7 +66,7 @@
svn export $SVNBASE/pkg/$PKG
svn export $SVNBASE/pkg/filevector
- cd DatABEL
+ cd $PKG
rm -f cleanup* configure* *.R
cd src
cp DAlib/*.c* .
@@ -96,64 +99,5 @@
fi
-# 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
-
-echo
-echo "--------------------------------------------------"
-echo "Installing missing R packages from CRAN and Bioconductor" \
- "into the directory $R_LIBS"
-echo "--------------------------------------------------"
-
-deps=$($scriptdir/getdeps.awk $PKG/DESCRIPTION)
-
-R --vanilla --no-save --slave <<EOF
-deplist=c($deps)
-
-new.packages <- deplist[!(deplist %in% installed.packages()[,"Package"])]
-
-if (length(new.packages)) {
- install.packages(new.packages, repos=$CRAN_repo)
-}
-EOF
-
-errwarn=0
-echo
-echo "--------------------------------------------------"
-echo "Building the package..."
-echo "--------------------------------------------------"
-R --vanilla CMD build $PKG
-PKGFILE=${PKG}_${DESCVERSION}.tar.gz
-
-echo
-echo "--------------------------------------------------"
-echo "Running normal R check on $PKGFILEs..."
-echo "--------------------------------------------------"
-R --vanilla CMD check $PKGFILE
-if grep -qE "NOTE|WARNING|ERROR" $PKG.Rcheck/00check.log; then
- errwarn=1
-fi
-
-if [ $CRANCHECK == true ]; then
- echo
- echo "--------------------------------------------------"
- echo "Check $PKGFILE with --as-cran..."
- echo "--------------------------------------------------"
- R --vanilla CMD check --as-cran $PKGFILE
- if sed -e 's/feasibility ... WARNING/feasibility ... WRNNG/' \
- -e 's/^WARNING/WRNNG/' $PKG.Rcheck/00check.log | \
- grep -qE "NOTE|WARNING|ERROR"; then
- errwarn=1
- fi
-fi
-
-## Report whether warnings, errors, notes where found
-if [ $errwarn -eq 1 ]; then
- echo
- echo "NOTEs, WARNINGs or ERRORs found!" 1>&2
- echo "Please fix before uploading to CRAN" 1>&2
- exit 1
-fi
+install_deps
+run_checks_build
Modified: pkg/GenABEL-general/distrib_scripts/makedistrib_VariABEL.sh
===================================================================
--- pkg/GenABEL-general/distrib_scripts/makedistrib_VariABEL.sh 2014-07-30 21:13:06 UTC (rev 1781)
+++ pkg/GenABEL-general/distrib_scripts/makedistrib_VariABEL.sh 2014-07-30 21:24:10 UTC (rev 1782)
@@ -62,9 +62,11 @@
echo "--------------------------------------------------"
echo "Checking out source code from SVN..."
echo "--------------------------------------------------"
- svn export svn://svn.r-forge.r-project.org/svnroot/genabel/pkg/filevector
- svn export svn://svn.r-forge.r-project.org/svnroot/genabel/pkg/DatABEL
- svn export svn://svn.r-forge.r-project.org/svnroot/genabel/pkg/${PKG}
+ SVNBASE=svn://svn.r-forge.r-project.org/svnroot/genabel/
+ svn export $SVNBASE/pkg/filevector
+ svn export $SVNBASE/pkg/DatABEL
+ svn export $SVNBASE/pkg/${PKG}
+
cd ${PKG}
rm -f cleanup* configure* *.R
cd src
More information about the Genabel-commits
mailing list