#! /bin/sh
### ====================================================================
### Substitute publishers in one or more BibTeX bibliography files by 
### standard abbreviations.
###
### Usage:
###	publisher.sh BibTeX-file(s) >new-BibTeX-file
###
### [02-Jan-2008] redirect stderr to /dev/null to ignore internal warnings 
### [20-May-1997] original version
### ====================================================================

prefix=${prefix-/usr/uumath}
test -d $prefix/bin || prefix=/usr/local

BINDIR=${bindir-$prefix/bin}
LIBDIR=`dirname $0`

$BINDIR/bibclean -keep-string -keep-preamble -keep-parbreaks -max-width 0 "$@" | \
	sed -e s/mrreviewer/MRreviewer/ | \
	$BINDIR/gawk -f $LIBDIR/publisher.awk 2> /dev/null | \
	$BINDIR/biborder | \
	$BINDIR/bibclean -keep-string -keep-preamble -keep-parbreaks
