IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 28, 2023, 2:43:59 PM (3 years ago)
Author:
eugene
Message:

cleanup logging and automatic advance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/eam/rawfix.20230221/src/queue.rawfix.sh

    r42399 r42440  
    11#!/bin/csh
    22
    3 if ($#argv != 1) then
    4   echo "USAGE: queue.rawfix.sh (mjddate)"
     3if ($#argv != 2) then
     4  echo "USAGE: queue.rawfix.sh (list) (filename)"
     5  echo "USAGE: queue.rawfix.sh (night) (YYYYMMDD)"
    56  exit 2
    67endif
     8
     9set mode = $1
    710
    811# make the rawfix database to track rawfix operations
     
    1215set DBPASS = "dvo"
    1316
    14 ## XXX validate the format (YYYYMMDD)?
    15 set mynight = $1
     17if ($mode == "list") then
     18  set filename = $2
    1619
    17 mysql -h $DBHOST -u $DBUSER -p$DBPASS $DBNAME -e "insert into nights (dateobs, state) values ('$mynight', 'new')"
     20  # just a big list of dates?
     21  foreach night (`cat $filename`)
     22    queue.rawfix.sh night $night
     23  end
     24  exit 0
     25endif
     26
     27if ($mode == "night") then
     28  ## XXX validate the format (YYYYMMDD)?
     29  set mynight = $2
     30 
     31  mysql -h $DBHOST -u $DBUSER -p$DBPASS $DBNAME -e "insert into nights (dateobs, state) values ('$mynight', 'new')"
     32  exit 0
     33endif
     34
     35echo "ERROR: unknown mode $mode"
     36exit 2
Note: See TracChangeset for help on using the changeset viewer.