File: bib2bib

package info (click to toggle)
bibtex2html 1.99-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 912 kB
  • sloc: ml: 6,334; makefile: 714; perl: 50; sh: 15
file content (13 lines) | stat: -rwxr-xr-x 431 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

set -e

infile=test.bib
outdir=${ADT_ARTIFACTS}
outfile=${outdir}/test.out.bib

# bib2bib without filter argument should be the identity up to cosmetic 
# changes, but we have to remove comments issued by bib2bib
bib2bib --quiet -oc /dev/null ${infile} | grep -va "@comment" > ${outfile}
# check that the number of bibtex stanzas is the same 
[ `egrep -c "@[a-zA-Z]+" ${infile}` -eq `egrep -c "@[a-zA-Z]+" ${outfile}` ]