#!/bin/sh

set -o errexit
set -o nounset
set -o noclobber

if [ ! -e ./tools/check ]; then
  echo "$0 must be run from the top of the project tree"
  exit
fi

./tools/build
cd staging

cran=--as-cran
#cran=

pkg=rpf

# inconsolata is not available from tlmgr; set R_RD4PDF to avoid it
R_RD4PDF="times,hyper" R CMD check $cran ${pkg}_*.tar.gz || true
cat ${pkg}.Rcheck/00install.out
echo Manual is here, staging/${pkg}.Rcheck/${pkg}-manual.pdf
