[Rcpp-commits] r3868 - scripts

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Oct 31 14:08:39 CET 2012


Author: edd
Date: 2012-10-31 14:08:38 +0100 (Wed, 31 Oct 2012)
New Revision: 3868

Modified:
   scripts/runBuild.sh
Log:
minor tweak to allow full build and test without copies to the web and build directories


Modified: scripts/runBuild.sh
===================================================================
--- scripts/runBuild.sh	2012-10-31 12:54:38 UTC (rev 3867)
+++ scripts/runBuild.sh	2012-10-31 13:08:38 UTC (rev 3868)
@@ -7,7 +7,38 @@
 # Copies tarball to web directory too
 
 set -e 
+set -u 
 
+progname=`basename $0`
+options='nh?'
+ 
+usage_and_exit()
+{
+    echo ""
+    echo "Usage: $progname [-n] [-?|-h]"
+    echo "  Run build and tests for Rcpp package"
+    echo ""
+    echo "Options:"
+    echo "  -n       no copy, only local build tests"
+    echo "  -h       show this help"
+    echo ""
+    exit 0
+}
+
+copy=1
+while getopts "$options" i 
+do 
+    case "$i" in
+	n)
+	    copy=0
+	    shift
+	    ;;
+	h|?)
+	    usage_and_exit
+	    ;;
+    esac
+done
+
 if [ ! -d Rcpp ]; then
     echo "Not above Rcpp/"
     exit -1
@@ -20,14 +51,19 @@
 #export RCPP_CXX0X="yes"
 export RCPP_CXX0X="no"
 
+export RunAllRcppTests="yes"
+
 ## remove old pdf vignettes and make fresh ones
-cd Rcpp/inst/doc && make pdfclean && make && cd - 
+cd Rcpp/inst/doc && make pdfclean && make pdfall && cd - 
 
 R CMD build --force Rcpp
 
-R CMD check Rcpp_${version}.tar.gz
+R CMD check --as-cran Rcpp_${version}.tar.gz
 
-test -d tarballs   && cp -vax Rcpp_${version}.tar.gz tarballs/rcpp_${version}.orig.tar.gz
-test -d build-area && cp -vax Rcpp_${version}.tar.gz build-area/rcpp_${version}.orig.tar.gz
-test -d ~/www/code/rcpp && cp -vax Rcpp_${version}.tar.gz ~/www/code/rcpp
+if [ ${copy} -eq 1 ]; then
+    test -d tarballs   && cp -vax Rcpp_${version}.tar.gz tarballs/rcpp_${version}.orig.tar.gz
+    test -d build-area && cp -vax Rcpp_${version}.tar.gz build-area/rcpp_${version}.orig.tar.gz
+    test -d ~/www/code/rcpp && cp -vax Rcpp_${version}.tar.gz ~/www/code/rcpp
+fi
 
+echo "Done with $encodedversion -- $version"
\ No newline at end of file



More information about the Rcpp-commits mailing list