Changeset 42440 for trunk/tools/eam/rawfix.20230221/src/advance.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/advance.rawfix.sh
r42430 r42440 2 2 3 3 if ($#argv < 1) then 4 echo "USAGE: advance.rawfix.sh all "4 echo "USAGE: advance.rawfix.sh all (Nmax)" 5 5 echo "USAGE: advance.rawfix.sh night (YYYYMMDD)" 6 6 exit 2 … … 9 9 set mode = $1 10 10 11 ## include a max number of active programs 11 12 if ($mode == "all") then 13 if ($#argv != 2) then 14 echo "USAGE: advance.rawfix.sh all (Nmax)" 15 exit 2 16 endif 17 18 set nMax = $2 19 set nActive = 0 20 set nAdvance = 0 12 21 set nights = `./check.rawfix.sh all | awk '(NR > 1){print $1}'` 13 22 foreach f ($nights) 14 echo -n "$f "15 23 ./advance.rawfix.sh night $f 24 set myResult = $status 25 if ($myResult == 1) continue 26 if ($myResult == 2) continue 27 if ($myResult == 3) continue 28 if ($myResult == 4) then 29 @ nActive ++ 30 endif 31 if ($myResult == 5) then 32 @ nActive ++ 33 @ nAdvance ++ 34 endif 35 if ($nActive >= $nMax) then 36 echo "advance $nAdvance nights, total of $nActive active nights" 37 exit 0 38 endif 16 39 end 40 echo "advance $nAdvance nights, total of $nActive active nights" 17 41 exit 0 18 42 endif 19 43 44 # advance STAGE0.done to STAGE1.new 45 # if already in STAGEx.new, return 4 46 # if setting to STAGEx.new, return 5 47 # otherwise, return 3 20 48 if ($mode == "night") then 21 49 if ($#argv != 2) then … … 29 57 30 58 set tgtstate = "NONE" 59 if ($mystate == "new") set tgtstate = "ckchip.new" 31 60 if ($mystate == "ckchip.done") set tgtstate = "fixchip.new" 32 61 if ($mystate == "fixchip.done") set tgtstate = "md5sum.new" … … 37 66 if ($mystate == "md5chk_s2.done") set tgtstate = "fixchip_s3.new" 38 67 if ($mystate == "fixchip_s3.done") set tgtstate = "ckchip_s3.new" 68 if ($mystate == "ckchip_s3.done") set tgtstate = "DONE" 39 69 40 if ($tgtstate == "NONE") then 41 echo "nothing to advance" 42 exit 0 43 endif 70 if ($mystate == "ckchip.new") set tgtstate = "ACTIVE" 71 if ($mystate == "fixchip.new") set tgtstate = "ACTIVE" 72 if ($mystate == "md5sum.new") set tgtstate = "ACTIVE" 73 if ($mystate == "md5chk.new") set tgtstate = "ACTIVE" 74 if ($mystate == "fixchip_s2.new") set tgtstate = "ACTIVE" 75 if ($mystate == "md5sum_s2.new") set tgtstate = "ACTIVE" 76 if ($mystate == "md5chk_s2.new") set tgtstate = "ACTIVE" 77 if ($mystate == "fixchip_s3.new") set tgtstate = "ACTIVE" 78 if ($mystate == "ckchip_s3.new") set tgtstate = "ACTIVE" 44 79 80 echo "$night : $mystate : $tgtstate" 81 82 # do not set these two states 83 if ($tgtstate == "NONE") exit 3 84 if ($tgtstate == "ACTIVE") exit 4 85 86 # only set these states 45 87 ./update.rawfix.sh $night $tgtstate 46 exit 0 88 89 if ($tgtstate == "DONE") exit 1 90 exit 5 47 91 endif 48 92 49 echo "ERROR: unknown mode: $mode 93 echo "ERROR: unknown mode: $mode" 50 94 exit 2
Note:
See TracChangeset
for help on using the changeset viewer.
