Ignore:
Timestamp:
01/10/06 22:12:58 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries

    r7265 r7460  
    2020#   Author(s): Daniela Dorner  08/2004 <mailto:dorner@astro.uni-wuerzburg.de>
    2121#
    22 #   Copyright: MAGIC Software Development, 2000-2004
     22#   Copyright: MAGIC Software Development, 2000-2006
    2323#
    2424#
    2525# ========================================================================
    2626#
     27# This script launches the building of sequences for all days for which
     28# this step is needed.
     29#
     30# After checking, if the script is already running, the todolist is
     31# written by using the macro getdolist.C
     32# Then the sequences are built for each date in the todolist using the
     33# macro buildsequenceentries.C
     34# If this was successful, the status is inserted into the database using
     35# the macro setstatus.C
    2736#
    2837
     
    5261makedir $getstatuslogpath >> $scriptlog 2>&1
    5362
     63# check if script is already running
    5464date > $lockpath/lock-buildsequenceentries.txt >> $scriptlog 2>&1
    5565checklock0=$?
     
    5767    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    5868    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    59          echo "-> getting list for buildsequenceentries is running -> exit" >> $scriptlog 2>&1
     69         echo "-> buildsequenceentries is running -> exit" >> $scriptlog 2>&1
    6070         date  >> $scriptlog 2>&1
    6171         exit;;
     
    6373esac
    6474
    65 
    66 echo "getting list..." >> $scriptlog 2>&1
     75# get todo list
     76echo "getting todo list..." >> $scriptlog 2>&1
    6777check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatus.log | grep int | sed -e 's/(int)//'`
    6878
    6979case $check0 in
    70    1)   echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1;;
    71    *)   echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
     80   1)   echo "check0=$check0 -> everything ok, got todo list -> build sequence entries" >> $scriptlog 2>&1;;
     81   *)   echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1
     82        rm -v $todofile >> $scriptlog 2>&1
     83        rm -v $lockpath/lock-buildsequenceentries.txt >> $scriptlog 2>&1
     84        date  >> $scriptlog 2>&1
     85        exit;;
    7286esac
    7387
     88# retrieve dates from todofile
    7489dates=(`cat $todofile`)
    75 
    7690if [ "$dates" = "" ]
    7791then
     
    8498
    8599echo "dates: "${dates[@]} >> $scriptlog 2>&1
    86 
    87100for date in ${dates[@]}
    88101do
     
    95108
    96109   case $check1 in
    97       1)   echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1
     110      1)   echo "check1=$check1 -> everything ok -> setting status for $date..." >> $scriptlog 2>&1
    98111           setstatuslogpath=$logpath/setstatus/buildsequenceentries/$year2
    99112           makedir $setstatuslogpath >> $scriptlog 2>&1
     
    102115           case $check2 in
    103116              1)   echo "check2=$check2 -> everything ok, status has been set" >> $scriptlog 2>&1;;
    104               *)   echo "check2=$check2 -> ERROR -> step could not be set" >> $scriptlog 2>&1;;
     117              *)   echo "check2=$check2 -> ERROR -> step could not be set for $date" >> $scriptlog 2>&1;;
    105118           esac
    106119           ;;
    107       *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
     120      *)   echo "check1=$check1 -> ERROR - buildsequenceentries.C failed for $date -> step has to be repeated" >> $scriptlog 2>&1;;
    108121   esac
    109122done
Note: See TracChangeset for help on using the changeset viewer.