#!/bin/bash

###############################################################################
## check bib file

## running through bibtex2html;
## should not produce warnings or errors
bibtex2html --no-abstract --nodoc --nobibsource --style plain_web.bst --style-sheet gph.css --output - pubs.bib > /dev/null
bibtex2html --no-abstract --nodoc --nobibsource --style abbrv_web.bst --style-sheet gph.css --output - pubs.bib > /dev/null

## running through bib2bib, checking that entries fall into one of 5 topics;
## should produce output '0'
bib2bib --no-comment -c 'not keywords : "\(^\|,\)[ ]*implementation[ ]*\(,\|$\)" and not keywords : "\(^\|,\)[ ]*semantics[ ]*\(,\|$\)" and not keywords : "\(^\|,\)[ ]*models[ ]+of[ ]+parallelism[ ]*\(,\|$\)" and not keywords : "\(^\|,\)[ ]*tools[ ]*\(,\|$\)" and not keywords : "\(^\|,\)[ ]*parallel[ ]+applications[ ]*\(,\|$\)"' pubs.bib | wc -l
