merge with remote
[aggexp.git] / scripts / make_summaries / launchReports.sh
... / ...
CommitLineData
1#!/bin/bash
2
3mkdir -p ../summariesByStation
4
5files=`ls ../aggexp/data/*.csv`
6for file in $files; do
7 stationName=`basename -s .csv $file`
8 sed "s/STATIONNAME/$stationName/g" modele.Rnw > tmp.Rnw
9 case $stationName in
10 "ALE"|"MRA"|"NEI"|"MAS")
11 sed -i "s/EXPERTSINDICES/c(1:4,6:10)/" tmp.Rnw
12 ;;
13 *)
14 sed -i "s/EXPERTSINDICES/1:10/" tmp.Rnw
15 ;;
16 esac
17 R CMD BATCH runSummary.R
18 pdflatex tmp.tex
19 mv tmp.pdf ../summariesByStation/$stationName.pdf
20done
21
22rm -f tmp*
23rm -f .RData
24rm -f runSummary.Rout
25if [ -d figs/ ]; then
26 rm -rf figs/
27fi