188f092007924642ae2e37ea29492d88dc4a52b1
angie
  Wed Apr 15 10:23:30 2020 -0700
Nextstrain changed the live-data URL; http://data.nextstrain.org/ncov.json has had the same data since April 8, now there's a dynamic query.  refs #25188

diff --git src/hg/utils/otto/nextstrainNcov/doUpdate.sh src/hg/utils/otto/nextstrainNcov/doUpdate.sh
index 3e4b23a..1e19ac2 100755
--- src/hg/utils/otto/nextstrainNcov/doUpdate.sh
+++ src/hg/utils/otto/nextstrainNcov/doUpdate.sh
@@ -1,30 +1,33 @@
 #!/bin/bash
 set -beEu -o pipefail
 
 #	Do not modify this script, modify the source tree copy:
 #	kent/src/hg/utils/nextstrainNcov/doUpdate.sh
 
 ottoDir=/hive/data/outside/otto/nextstrainNcov
 chromSizes=/hive/data/genomes/wuhCor1/chrom.sizes
 gbdbDir=/gbdb/wuhCor1/nextstrain
 
+ncovJsonUrl='https://nextstrain.org/charon/getDataset?prefix=/ncov/global'
+
 cd $ottoDir
 
 # The file is named .json, but is actually gzipped, so gunzip it.
-curl -s http://data.nextstrain.org/ncov.json | gunzip -c > ncov.json
-curl -s -I http://data.nextstrain.org/ncov.json \
+curl -s "$ncovJsonUrl" \
+| gunzip -c > ncov.json
+curl -s -I "$ncovJsonUrl" \
 | grep Last-Mod | sed -re 's/Last-Modified: //; s/\r//;' \
    > ncov.json.date
 latestDate=$(cat ncov.json.date)
 oldDate=$(cat old.ncov.json.date)
 if [ $(date -d "$latestDate" +%s) -le $(date -d "$oldDate" +%s)  ]; then
     exit 0
 fi
 
 today=`date +%F`
 mkdir -p $today
 cp -p ncov.json $today
 mv ncov.json old.ncov.json
 mv ncov.json.date old.ncov.json.date
 
 runDir=$ottoDir/$today