#!/bin/sh -e

pkg=r-bioc-limma
if [ "$ADTTMP" = "" ] ; then
  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
fi
cd $ADTTMP
cp -a /usr/share/doc/${pkg}/tests/* $ADTTMP
for test in *R.gz
do
  zcat ${test} > `basename ${test} .gz`
  LC_ALL=C R CMD BATCH `basename ${test} .gz`
  LC_ALL=C R CMD Rdiff `basename ${test} .gz`out.save* `basename ${test} .gz`out
  rm `basename ${test} .gz`out .RData
done
rm -f $ADTTMP/*

