#!/bin/bash
rm -f /tmp/rapidtex/temp.*
mkdir -p /tmp/rapidtex/
cp *.eps /tmp/rapidtex/
rapidtex $1.rptex > /tmp/rapidtex/temp.tex
cd /tmp/rapidtex/
echo "------RUNNING LATEX------------"
latex temp.tex
pwd
ls -l temp.tex
echo "------RUNNING DVIPS------------"
dvips -t a4 temp.dvi -o 
pwd
ls -l *dvi
cd -
pwd
ls -l *ps
echo "------COPYING RESULTING PS FILE BACK--------------"
cp -v /tmp/rapidtex/temp.ps $1.ps
gv $1.ps & 
