#! /bin/sh

file=`echo $1 | sed s/\\\\..*//g`

sed "s/Title:.*/Title: ref-$file/g" ps-ref/prolog.ps > /tmp/1.ps
cat ps-ref/$file.ps >> /tmp/1.ps

sed "s/Title:.*/Title: chk-$file/g" ps-ref/prolog.ps > /tmp/2.ps
cat ps-chk/$file.ps >> /tmp/2.ps

ghostview /tmp/1.ps &
ghostview /tmp/2.ps

/bin/rm /tmp/1.ps /tmp/2.ps

