src/utils/qa/findLevel 1.2

1.2 2010/03/05 19:05:27 rhead
Changed dependency on symlink in home directory to dependency on the kent source tree in home directory. Also moved this check closer to the top, as tdbQuery run by default also depends on the tree being in the home dir.
Index: src/utils/qa/findLevel
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/findLevel,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -B -U 4 -r1.1 -r1.2
--- src/utils/qa/findLevel	2 Mar 2010 02:08:44 -0000	1.1
+++ src/utils/qa/findLevel	5 Mar 2010 19:05:27 -0000	1.2
@@ -37,22 +37,23 @@
   db="$1"
   tableName="$2"
 fi
 
-# make sure this is a valid database name
-if ! tdbQuery "select db from $db limit 1" | grep -q $db
+# check for kent source dir at $USER root
+if ! [ -d ~/kent/src/hg/makeDb/trackDb/ ]
 then
-  echo -e "\n ERROR: Invalid database name.  Try again.\n" >&2
+  echo -e "\n  ERROR: `basename $0` presumes you have the kent source
+  source tree in your home dir, in a dir called \"kent\"\n" >&2
   exit 1
 fi
 
-# check for trackDb dir at $USER root
-if ! file ~/trackDb | grep -q 'symbolic link'
+# make sure this is a valid database name
+if ! tdbQuery "select db from $db limit 1" | grep -q $db
 then
-  echo -e "\n  ERROR: `basename $0` presumes you have a symlink
-  to trackDb in your home dir\n" >&2
+  echo -e "\n ERROR: Invalid database name.  Try again.\n" >&2
   exit 1
 fi
+
 echo
 
 ###########################################
 # find the level of the associated .html file
@@ -56,9 +57,9 @@
 
 ###########################################
 # find the level of the associated .html file
 # start at the assembly level
-cd ~/trackDb/*/$db
+cd ~/kent/src/hg/makeDb/trackDb/
 currDir=""
 
 if [ -e $tableName.html ]
 then # the .html file is found at the assembly level