#!/usr/bin/env bash export COQBIN=$BIN export PATH=$COQBIN:$PATH TMP=`mktemp -d` cd $TMP cat > coq_environment.txt < /dev/null N=`grep COQMF_OCAMLFIND CoqMakefile.conf | grep /overridden | wc -l` if [ $N -ne 1 ]; then echo COQMF_OCAMLFIND not overridden by coq_environment cat CoqMakefile.conf exit 1 fi export COQLIB="/overridden2" N=`./coqc -config | grep COQLIB | grep /overridden2 | wc -l` if [ $N -ne 1 ]; then echo COQLIB not overridden by COQLIB when coq_environment present coqc -config exit 1 fi rm -rf $TMP exit 0