Diff of /classic-bugs/vol2/Makefile [b27580] .. [1771d5] Maximize Restore

  Switch to side-by-side view

--- a/classic-bugs/vol2/Makefile
+++ b/classic-bugs/vol2/Makefile
@@ -13,8 +13,7 @@
 	    for cmdfile in `ls test*.cmd`; do \
 	       echo "Running " $${cmdfile}; \
 	       ($(JAGS) $${cmdfile} && \
-	       R --vanilla --quiet < ../../R/bench.R && \
-	       mv dumpdata.R bench-$${cmdfile%%.cmd}.R;) || exit 1; \
+	       Rscript -e "benchfile='bench-$${cmdfile%%.cmd}.R'; source('../../R/bench.R')";) || exit 1; \
 	    done;) || exit 1;\
 	done;
 
@@ -23,10 +22,9 @@
 	@for d in $(EXAMPLES); do \
 	   (cd $${d} && \
 	    for cmdfile in `ls test*.cmd`; do \
-	      (cp bench-$${cmdfile%%.cmd}.R bench.R &&  \
-	      $(JAGS) $${cmdfile} && \
-	      R --vanilla --quiet < ../../R/check.R && \
-	      rm bench.R;) || exit 1; \
+	      ($(JAGS) $${cmdfile} && \
+	       Rscript -e "source('bench-$${cmdfile%%.cmd}.R'); source('../../R/check.R')";) \
+		|| exit 1; \
 	    done;) || exit 1;\
 	done;