1#! /bin/bash
2WHAT=$1
3DIR=$2
4MINIC=$3
5MAXIC=$4
6MINOC=$5
7MAXOC=$6
8prefix=$8
9
10meanstatsfilename=$2/mean.html
11
12WORK_DIR=tmp
13mkdir $WORK_DIR
14
15DATA_FILE=`find $DIR -name "*.dat" | grep _${WHAT}`
16
17if [ -n "$DATA_FILE" ]; then
18
19  echo ""
20  echo "$1..."
21  for FILE in $DATA_FILE
22  do
23          ##echo hello world
24          ##echo "mk_mean_script1" ${FILE}
25    BASE=${FILE##*/} ; BASE=${FILE##*/} ; AVANT=bench_${WHAT}_ ; REDUC=${BASE##*$AVANT} ; TITLE=${REDUC%.dat}
26
27    ##echo "mk_mean_script1" ${TITLE}
28    cp $FILE ${WORK_DIR}/${TITLE}
29
30  done
31
32  cd $WORK_DIR
33  ../main $1 $3 $4 $5 $6 * >> ../$meanstatsfilename
34  ../mk_new_gnuplot.sh $1 $2 $7
35  rm -f *.gnuplot
36  cd ..
37
38  echo '<br/>' >> $meanstatsfilename
39
40  webpagefilename=$2/index.html
41  # echo '<h3>'${WHAT}'</h3>'  >> $webpagefilename
42  echo '<hr/><a href="'$prefix$1'.pdf"><img src="'$prefix$1'.png" alt="'${WHAT}'" /></a><br/>'  >> $webpagefilename
43
44fi
45
46rm -R $WORK_DIR
47
48
49
50
51
52
53