#!/bin/bash

tmpdir="/home/lleveric/tmp/results/"
basegen="generated"
baselog="/output.log"
deleteold=""

gvim --servername BUNK
for i in {00..20}; do
   fulldir=$tmpdir$basegen$i
   fulllog=$tmpdir$basegen$i$baselog
   if [ -d $fulldir ]; then
      echo "Found "$fulldir
      deleteold="true"
   else
      echo "Creating "$fulldir
      mkdir $fulldir
      exec > $fulllog
      mvn clean install -Ddrools.dump.dir=$fulldir
      exec > -
      gvim --servername BUNK --remote $fulllog
   fi
done

