##!/bin/sh

rm -rf /tmp/web
mkdir /tmp/web

GALS=`ssh drahokam ls /aux/fox/bench/*/Makefile.def | cut -d/ -f5`

for d in $GALS
do
  rsync -av --include "*.eps" --include "*.txt" --exclude="*" drahokam:/aux/fox/bench/$d/plots/ /tmp/web/$d
done

mv /tmp/web/myintmap /tmp/web/newintmap
mv /tmp/web/mymap /tmp/web/newmap
mv /tmp/web/queue /tmp/web/sequence
mv /tmp/web/ral/* /tmp/web/sequence
rmdir /tmp/web/ral

find /tmp/web -type f | xargs chmod 644
find /tmp/web -type d | xargs chmod 755

for eps in /tmp/web/*/*.eps
do
  ps2pdf14 -dEPSCrop -dAutoRotatePages=/None $eps ${eps%eps}pdf
done

rsync -cav /tmp/web/ ucw:www/papers/containers
