Index: trunk/tools/eam/rawfix.20230221/src/queue.rawfix.sh
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/queue.rawfix.sh	(revision 42399)
+++ trunk/tools/eam/rawfix.20230221/src/queue.rawfix.sh	(revision 42440)
@@ -1,8 +1,11 @@
 #!/bin/csh
 
-if ($#argv != 1) then
-  echo "USAGE: queue.rawfix.sh (mjddate)"
+if ($#argv != 2) then
+  echo "USAGE: queue.rawfix.sh (list) (filename)"
+  echo "USAGE: queue.rawfix.sh (night) (YYYYMMDD)"
   exit 2
 endif
+
+set mode = $1
 
 # make the rawfix database to track rawfix operations
@@ -12,6 +15,22 @@
 set DBPASS = "dvo"
 
-## XXX validate the format (YYYYMMDD)?
-set mynight = $1
+if ($mode == "list") then
+  set filename = $2
 
-mysql -h $DBHOST -u $DBUSER -p$DBPASS $DBNAME -e "insert into nights (dateobs, state) values ('$mynight', 'new')"
+  # just a big list of dates?
+  foreach night (`cat $filename`)
+    queue.rawfix.sh night $night
+  end
+  exit 0
+endif
+
+if ($mode == "night") then
+  ## XXX validate the format (YYYYMMDD)?
+  set mynight = $2
+  
+  mysql -h $DBHOST -u $DBUSER -p$DBPASS $DBNAME -e "insert into nights (dateobs, state) values ('$mynight', 'new')"
+  exit 0
+endif
+
+echo "ERROR: unknown mode $mode"
+exit 2
