|
Last change
on this file since 18795 was 18211, checked in by Daniela Dorner, 10 years ago |
|
small fix for certaindate check
|
-
Property svn:executable
set to
*
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | #!/bin/bash
|
|---|
| 2 | #
|
|---|
| 3 | source `dirname $0`/../Sourcefile.sh
|
|---|
| 4 | printprocesslog "INFO starting $0 $1"
|
|---|
| 5 |
|
|---|
| 6 | # get dates
|
|---|
| 7 | if [ "$certaindate" != "" ]
|
|---|
| 8 | then
|
|---|
| 9 | checkstring=`echo $certaindate | grep -E -o '^20[0-9][0-9]\/[01][0-9]\/[0-3][0-9]$'\|'^[0-9][0-9][0-9]$'`
|
|---|
| 10 | if [ "$checkstring" = "" ]
|
|---|
| 11 | then
|
|---|
| 12 | echo "Please give the variable certaindate in the correct format (YYYY/MM/DD)"
|
|---|
| 13 | finish
|
|---|
| 14 | fi
|
|---|
| 15 | getdates $certaindate
|
|---|
| 16 | else
|
|---|
| 17 | if [ "$1" = "" ]
|
|---|
| 18 | then
|
|---|
| 19 | # get last 6 nights if hour between 7 and 19h, else only current night
|
|---|
| 20 | getdates 3 7 19
|
|---|
| 21 | else
|
|---|
| 22 | getdates $1
|
|---|
| 23 | fi
|
|---|
| 24 | fi
|
|---|
| 25 |
|
|---|
| 26 | # for testing only
|
|---|
| 27 | anapath=/loc_data/analysis
|
|---|
| 28 |
|
|---|
| 29 | cd $mars
|
|---|
| 30 |
|
|---|
| 31 | for date in ${dates[@]}
|
|---|
| 32 | do
|
|---|
| 33 | #echo "processing "$date"..."
|
|---|
| 34 | outpath=$anapath/quality/$date
|
|---|
| 35 | makedir $outpath
|
|---|
| 36 | logfile=$anapath/quality/$date/quality.log
|
|---|
| 37 | year=`echo $date | cut -d/ -f1`
|
|---|
| 38 | month=`echo $date | cut -d/ -f2 | sed -e 's/^0//g'`
|
|---|
| 39 | day=`echo $date | cut -d/ -f3 | sed -e 's/^0//g'`
|
|---|
| 40 | printprocesslog "DEBUG root -q -b fact/plots/quality.C\("$year"\,"$month"\,"$day"\,\""$outpath"\"\) | tee $logfile | intgrep"
|
|---|
| 41 | check1=`root -q -b fact/plots/quality.C\($year\,$month\,$day\,\""$outpath"\"\) 2>&1 | tee $logfile | intgrep`
|
|---|
| 42 |
|
|---|
| 43 | case $check1 in
|
|---|
| 44 | 0) printprocesslog "INFO quality.C was successful for date "$date" (check1=$check1)"
|
|---|
| 45 | ;;
|
|---|
| 46 | *) printprocesslog "ERROR quality.C failed for date "$date" (check1=$check1)"
|
|---|
| 47 | ;;
|
|---|
| 48 | esac
|
|---|
| 49 | done
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 | finish
|
|---|
| 53 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.