src/utils/qa/getTableStatus.csh 1.6

1.6 2009/04/11 00:37:04 rhead
Sourced new qaConfig file at the top. Changed -h hgwbeta lines to look for sql host stored in a variable, specified in the new qaConfig file.
Index: src/utils/qa/getTableStatus.csh
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/getTableStatus.csh,v
retrieving revision 1.5
retrieving revision 1.6
diff -b -B -U 1000000 -r1.5 -r1.6
--- src/utils/qa/getTableStatus.csh	21 Feb 2007 23:45:19 -0000	1.5
+++ src/utils/qa/getTableStatus.csh	11 Apr 2009 00:37:04 -0000	1.6
@@ -1,65 +1,66 @@
 #!/bin/tcsh
+source `which qaConfig.csh`
 
 ################################
 #  
 #  02-06-07
 #  Robert Kuhn
 #
 #  gets TABLE STATUS from a machine in real time using wget
 #
 ################################
 
 set db=""
 set mach="hgwbeta"
 set url1=""
 set url2=""
 set url3=""
 set url=""
 
 if ( $#argv < 1 || $#argv > 2 ) then
   echo
   echo "  gets database TABLE STATUS from a machine in real time using wget."
   echo "  note:  currently only works for dbs naming an assembly."
   echo
   echo "    usage:  database [machine]"
   echo "              defaults to beta"
   echo
   exit
 else
   set db=$argv[1]
 endif
 
 if ( "$HOST" != "hgwdev" ) then
  echo "\n error: you must run this script on dev!\n"
  exit 1
 endif
 
 
 if ( $#argv == 2 ) then
   set mach=$argv[2]
 endif
 
 checkMachineName.csh $mach
 if ( $status ) then
   exit 1
 endif
 
 # get the STATUS
 set url1="http://"
 set url2=".cse.ucsc.edu/cgi-bin/hgTables?db=$db&hgta_doMetaData=1"
 set url3="&hgta_metaStatus=1"
 set url="$url1$mach$url2$url3"
 wget -q -O $mach.tempfile "$url"
 if ( $db != `head -1 $mach.tempfile | awk '{print $NF}'` ) then
   # does not allow uniProt or visiGene, etc to work.  
   # hgTables.doMetaData sets the db variable to hg18 if not an assembly
   echo
   echo "  $db is not a valid database on $mach"
   echo
   rm -f $mach.tempfile
   exit 1
 endif
 cat $mach.tempfile
 rm -f $mach.tempfile
 exit