2b469974db57314e2aefab49529896e3ecc12081
braney
  Mon Jul 18 13:41:04 2022 -0700
fix problem where description.html is not copied into place when
building alpha or update in trackDb

diff --git src/hg/makeDb/trackDb/loadTracks src/hg/makeDb/trackDb/loadTracks
index 9a48ee6..16b52e2 100755
--- src/hg/makeDb/trackDb/loadTracks
+++ src/hg/makeDb/trackDb/loadTracks
@@ -4,30 +4,31 @@
 options:
    -release=release
    -strict
    -addVersion -- add cartVersion pseudo-table 
    -raName=trackDb.ra  - base name of ra file
    -grpSql=grp.sql - create a grp table using this sql file
    -sqlDir=../../lib - directory containg trackDb.sql and hgFindSpec.sql
    -gbdbList=user@machine - machine with /gbdb on it'
 
 UNAME_N=`uname -n`
 UNAME_N=${UNAME_N/.soe.ucsc.edu/}
 release=''
 settings=''
 local=''
 strict=''
+noHtmlCheck=''
 raName=''
 grpSql=''
 gbdbList=''
 sqlDir='../../lib'
 while [[ $1 == -* ]] ; do
     case $1 in
         -release=*)
             release=$(echo $1 | sed 's/-release=//') ;;
         -strict)
             strict=yes;;
         -noHtmlCheck)
             noHtmlCheck=yes;;
         -addVersion)
             addVersion=yes;;
         -settings)
@@ -110,31 +111,31 @@
     if [ -n "$gbdbList" ] ; then
         topts="$topts -gbdbList=$gbdbList"
     fi
     # don't use set -x, since the autoload scripts e-mail stderr.
     local cmd="hgTrackDb $topts $org $db $trackDb ${sqlDir}/trackDb.sql ."
     echo $cmd
     eval $cmd
 
     cmd="tdbQuery $qopts 'select count(*) from $db' -root=`pwd`"
     echo $cmd
     eval $cmd
 
     cmd="hgFindSpec $fopts $org $db $hgFindSpec ${sqlDir}/hgFindSpec.sql ."
     echo $cmd
     eval $cmd
-    if [ -z "$strict" -a -f $dbpath/description.html ] ; then
+    if [ -n "$noHtmlCheck" -a -f $dbpath/description.html ] ; then
 	if [ "X${UNAME_N}Y" = "XhgwdevY" ]; then
 	    if [ ! -L /gbdb/$db/html -a -d /hive/data/genomes/$db/html ]; then
 		rm -f /gbdb/$db/html/description.html
 		rmdir /gbdb/$db/html
 		ln -s /hive/data/genomes/$db/html /gbdb/$db/html
 	    fi
 	    if [ -f /gbdb/$db/html/description.html ]; then
 		rm -f /gbdb/$db/html/description.html
 	    fi
 	fi
 	if [ $dbpath/description.html -nt /gbdb/$db/html/description.html ]; then
 	    rm -f /gbdb/$db/html/description.html
 	    cp -p $dbpath/description.html /gbdb/$db/html/description.html
 	fi
     fi