1f007b3f3910f8616c4f02046fd199a0503933ed kuhn Wed Apr 2 12:20:07 2014 -0700 fixed bug reported by steve and another found while fixing. sorry. shoulda been tested more thoroughly diff --git src/utils/qa/updateTimes.csh src/utils/qa/updateTimes.csh index 505d40b..d39558a 100755 --- src/utils/qa/updateTimes.csh +++ src/utils/qa/updateTimes.csh @@ -32,43 +32,46 @@ echo " tablelist will accept single table" echo " verbose mode will print machines names" echo exit else set db=$argv[1] set tablelist=$argv[2] endif # cat $tablelist if ( "$HOST" != "hgwdev" ) then echo "\n error: you must run this script on dev!\n" exit 1 endif + if ( $#argv == 3 ) then if ( $argv[3] == "verbose" ) then set dot=( 'dev ' 'beta ' 'pub ' 'rr ' 'euro ' ) else if ( $argv[3] == "noEuro" ) then set noEuro=true else echo echo 'sorry. third argument must be "verbose" or "noEuro"' $0 exit endif endif +endif + # check if it is a file or a tablename file $tablelist | egrep -q "ASCII text" if (! $status) then set tables=`cat $tablelist` else set tables=$tablelist endif foreach table ($tables) echo echo $table echo "=============" set first=`hgsql -N -e 'SHOW TABLE STATUS LIKE "'$table'"' $db \ @@ -80,26 +83,26 @@ echo "$dot[2]"$second if ( "$table" == "trackDb" ) then set third=`hgsql -h $sqlbeta -N -e 'SHOW TABLE STATUS LIKE "'trackDb_public'"' $db \ | awk '{print $14, $15}'` echo "$dot[3]"$third "(trackDb_public)" endif echo set fourth=`getRRtableStatus.csh $db $table Update_time` if ( $status ) then set fourth="" endif echo "$dot[4]"$fourth - if ( noEuro == "false" ) then + if ( $noEuro == "false" ) then set fifth=`getTableStatus.csh $db genome-euro | sed '1,2d' \ | grep -w ^$table | awk '{print $14, $15}'` if ( $status ) then set fifth="" endif echo "$dot[5]"$fifth endif end echo