Last change
on this file since 20049 was 17897, checked in by Daniela Dorner, 11 years ago |
included loop over direction, removed obsolete lines, included limit for zd
|
-
Property svn:executable
set to
*
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | #
|
---|
3 | # Script to copy scheduling plots to the web
|
---|
4 | #
|
---|
5 |
|
---|
6 | # remarks:
|
---|
7 | #
|
---|
8 | # be aware that the script only writes files which don't exist yet
|
---|
9 | # i.e. in case of a new sw version, old files have to be deleted or moved away
|
---|
10 | #
|
---|
11 | # script to be executed on gate, i.e. FACT++ there has to be up-to-date
|
---|
12 |
|
---|
13 | # create plots for past (-) / future (+) night
|
---|
14 | directions=( "-" "+" )
|
---|
15 |
|
---|
16 | # number of days to be treated
|
---|
17 | numdays=1000
|
---|
18 |
|
---|
19 | plot=/home/fact/FACT++/makeplots
|
---|
20 | root=/opt/root_v5.34.10/bin/thisroot.sh
|
---|
21 |
|
---|
22 | # creating files for X days (if they don't exist yet)
|
---|
23 | for (( i=0; i < $numdays ; i++))
|
---|
24 | do
|
---|
25 | for direction in ${directions[@]}
|
---|
26 | do
|
---|
27 | outpath=/home/factwww/scheduling/`date --date="${direction}${i}days" +%Y/%m/%d`
|
---|
28 | date=`date --date="${direction}${i}days" +%Y-%m-%d`
|
---|
29 | echo -n $date
|
---|
30 |
|
---|
31 | if ! [ -d $outpath ]
|
---|
32 | then
|
---|
33 | mkdir -p $outpath
|
---|
34 | else
|
---|
35 | echo $outpath" exists -> continue"
|
---|
36 | continue
|
---|
37 | fi
|
---|
38 | echo -n ": creating files..."
|
---|
39 | cd $outpath
|
---|
40 | $plot $date --max-zd=75 --max-current=90 >/dev/null 2>&1
|
---|
41 | files=`ls *.eps`
|
---|
42 | for file in $files
|
---|
43 | do
|
---|
44 | if ls $file | grep Legend >/dev/null
|
---|
45 | then
|
---|
46 | scale=0.8
|
---|
47 | else
|
---|
48 | scale=1.5
|
---|
49 | fi
|
---|
50 | pstoimg -quiet -scale $scale $file
|
---|
51 | done
|
---|
52 | echo ""
|
---|
53 | done
|
---|
54 | done
|
---|
Note:
See
TracBrowser
for help on using the repository browser.