Changeset 42440 for trunk/tools/eam/rawfix.20230221/src/queue.rawfix.sh
- Timestamp:
- Mar 28, 2023, 2:43:59 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rawfix.20230221/src/queue.rawfix.sh
r42399 r42440 1 1 #!/bin/csh 2 2 3 if ($#argv != 1) then 4 echo "USAGE: queue.rawfix.sh (mjddate)" 3 if ($#argv != 2) then 4 echo "USAGE: queue.rawfix.sh (list) (filename)" 5 echo "USAGE: queue.rawfix.sh (night) (YYYYMMDD)" 5 6 exit 2 6 7 endif 8 9 set mode = $1 7 10 8 11 # make the rawfix database to track rawfix operations … … 12 15 set DBPASS = "dvo" 13 16 14 ## XXX validate the format (YYYYMMDD)? 15 set mynight = $1 17 if ($mode == "list") then 18 set filename = $2 16 19 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 25 endif 26 27 if ($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 33 endif 34 35 echo "ERROR: unknown mode $mode" 36 exit 2
Note:
See TracChangeset
for help on using the changeset viewer.
