Changeset 42400 for trunk/tools/eam/rawfix.20230221/src/check.rawfix.sh
- Timestamp:
- Mar 8, 2023, 9:44:22 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rawfix.20230221/src/check.rawfix.sh
r42399 r42400 16 16 set DBPASS = "dvo" 17 17 18 set DBOPTS = "-B --skip-column-names -h $DBHOST -u $DBUSER -p$DBPASS $DBNAME" 18 # set DBOPTS = "-B --skip-column-names -h $DBHOST -u $DBUSER -p$DBPASS $DBNAME" 19 set DBOPTS = "-B -h $DBHOST -u $DBUSER -p$DBPASS $DBNAME" 20 21 if ($mode == "all") then 22 if ($#argv != 1) then 23 echo "USAGE: check.rawfix.sh all" 24 exit 2 25 endif 26 27 mysql $DBOPTS -e "select dateobs, state from nights" 28 exit 0 29 endif 30 31 if ($mode == "stats") then 32 if ($#argv != 1) then 33 echo "USAGE: check.rawfix.sh stats" 34 exit 2 35 endif 36 37 mysql $DBOPTS -e "select count(dateobs) Nnights, state from nights group by state" 38 exit 0 39 endif 19 40 20 41 if ($mode == "night") then … … 29 50 endif 30 51 31 if ($mode == "new") then 32 mysql $DBOPTS -e "select dateobs from nights where (state = 'new')" 52 if ($mode == "state") then 53 if ($#argv != 2) then 54 echo "USAGE: check.rawfix.sh state (state)" 55 exit 2 56 endif 57 58 set mystate = $2 59 60 if ($mystate == "new") goto good_state 61 if ($mystate == "rsync") goto good_state 62 if ($mystate == "md5sum.new") goto good_state 63 64 echo "ERROR: unknown mode $mystate" 65 exit 2 66 67 good_state: 68 mysql $DBOPTS -e "select dateobs from nights where (state = '$mystate')" 33 69 exit 0 34 70 endif
Note:
See TracChangeset
for help on using the changeset viewer.
