#!/bin/tcsh

if ($#argv != 1) then
	echo "need 1 arg: file name (with .lisp extension)"
	exit(1)
endif

set time=10000

set book=$1:r

echo "Output will go to $book.out."

echo "("certify-book \"$book\"")" | acl2 > $book.out

grep "Write the certificate" $book.out > /dev/null

set success=$status

if ($success == 0) then
   echo "$book has been certified!"
else
   echo "certify $book FAILED!"
endif

exit $success
