be6bc76d6d45a41a4bf9c7ca96b404ea38ab306c
chmalee
  Mon Feb 10 15:45:43 2020 -0800
Fixing a bunch of archiveTracks.sh typos pointed out by code review, refs #24936

diff --git src/hg/utils/archiveTracks.sh src/hg/utils/archiveTracks.sh
index 9bef4b0..a4a9abd 100755
--- src/hg/utils/archiveTracks.sh
+++ src/hg/utils/archiveTracks.sh
@@ -169,51 +169,51 @@
     fi
     cd ${db}/"${trackSetName}"/${versionName}
     if [[ ! -z "${files}" ]]
     then
         backupBigFiles "${db}" "${files}"
     fi
     if [[ ! -z "${tables}" ]]
     then
         backupTables "${db}" "${tables}"
     fi
     cd ${archiveDir}
 }
 
 printCheck()
 {
-    db=$1
-    archRoot="`realpath ${archiveDir}`/${db}/${trackSetName}/${versionName}"
+    currentDb=$1
+    archRoot="`realpath ${archiveDir}`/${currentDb}/${trackSetName}/${versionName}"
     printf "check mode: moving files to the following directory:\n"
     printf "%s\n" "${archRoot}"
     printf "\n"
     if [[ -e "${tables}" ]]
     then
         printf "The following tables and trackDb's will be dumped:\n"
         for tbl in $(cat "${tables}")
         do
             printf "${archRoot}/${tbl}.gz\n" ""
-            printf "${archRoot}/${tbl}.tab.tab.sql\n" ""
+            printf "${archRoot}/${tbl}.trackDb.tab.sql\n" ""
             printf "${archRoot}/${tbl}.sql\n" ""
         done
     else
         printf "The following tables and trackDb's will be dumped:\n"
         for tbl in ${tables}
         do
             printf "${archRoot}/${tbl}.gz\n" ""
             printf "${archRoot}/${tbl}.trackDb.tab.gz\n" ""
-            printf "${archRoot}/${tbl}.sqk\n" ""
+            printf "${archRoot}/${tbl}.sql\n" ""
         done
     fi
     printf "\n"
     if [[ -e "${files}" ]]
     then
         printf "The following big data files will be archived:\n"
         for f in $(cat "${files}")
         do
             fname=`basename ${f}`
             printf "%s/%s\n" "${archRoot}" "${fname}"
         done
     else
         printf "The following big data files will be archived:\n"
         for f in ${files}
         do
@@ -301,31 +301,31 @@
     tmp="${tables}"
     tables=`pwd`/"${tmp}"
     if [ "${verbose}" = "TRUE" ]
     then
         printf "Fixing up tables list to %s\n" "${tables}"
     fi
 fi
 
 # set the archive parent directory location
 if [[ ! -d "${archiveDir}" ]]
 then
     if [ "${verbose}" = "TRUE" ]
     then
         printf "Archiving to %s\n" "${archiveDir}" 1>&2
     fi
-    if [ "${check}" != "TRUE" ]
+    if [ "${checkOnly}" != "TRUE" ]
     then
         mkdir -p "${archiveDir}"
     fi
 fi
 
 if [[ "${archiveDir}" != /* ]]
 then
     tmp="${archiveDir}"
     archiveDir=`pwd`/"${tmp}"
 fi
 
 
 cd "${archiveDir}"
 if [[ -f "${dbList}" ]]
 then