#!/bin/sh

latex $1
bibtex $1
latex $1
latex $1

sed -e "s/{thebibliography}{10}/{enumerate}/" \
    -e "s/{thebibliography}/{enumerate}/" \
    -e "s/\\\newblock//" \
    -e "s/\\\bibitem.*/\\\item/" \
    $1.bbl > $2.tex
