Index: src/utils/qa/getVersion.csh
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/getVersion.csh,v
retrieving revision 1.4
retrieving revision 1.5
diff -b -B -U 1000000 -r1.4 -r1.5
--- src/utils/qa/getVersion.csh	14 Feb 2007 21:48:15 -0000	1.4
+++ src/utils/qa/getVersion.csh	11 Apr 2009 00:37:04 -0000	1.5
@@ -1,65 +1,66 @@
 #!/bin/tcsh
+source `which qaConfig.csh`
 
 ################################
 #  
 #  02-08-07
 #  Robert Kuhn
 #
 #  gets MySql version directly from database
 #
 ################################
 
 set machine=""
 set part=""
 
 if ( $#argv < 1 ||  $#argv > 2 ) then
   echo
   echo "  gets MySql version directly from database."
   echo
   echo "    usage:  machine [1 2 3]"
   echo "      1,2 & 3 return version and sub-version values only"
   echo
   exit
 else
   set machine=$argv[1]
 endif
 
 if ( 2 == $#argv ) then
   set part=$argv[2]
 endif
 
 checkMachineName.csh $machine
 if ( $status ) then
   exit 1
 endif
 
 set url1="http://"
 # set url2=".cse.ucsc.edu/cgi-bin/hgTables?hgta_doMysqlVersion=1"
 set url2=".cse.ucsc.edu/cgi-bin/hgTables?hgta_doMetaData=1&hgta_metaVersion=1"
 set url="$url1$machine$url2"
 set version=`wget -q -O /dev/stdout "$url"`
 set version=`echo $version | awk -F" " '{print $2}'`
 if (! $part ) then
   echo $version | grep .
 else
   if ( 1 == $part ) then
     echo $version | grep . | awk -F. '{print $1}'
   else
     if ( 2 == $part ) then
       echo $version | grep . | awk -F. '{print $2}'
     else
       if ( 3 == $part ) then
         echo $version | grep . | awk -F. '{print $3}' \
          | awk -F- '{print $1}'
       else
         echo
         echo "  improper parameter:  $part"
         echo
         echo "$0"
         $0
       endif
     endif
   endif
 endif
 # rm -f $machine.version
 

