#!/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=gwsem

R CMD check $cran ${pkg}_*.tar.gz || true
echo Manual is here, staging/${pkg}.Rcheck/${pkg}-manual.pdf
