2020-04-28 04:14:33 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
|
|
|
|
cd "${dir}"
|
|
|
|
|
2021-06-28 15:48:39 +00:00
|
|
|
node=/home/tmont/.nvm/versions/node/v12.16.2/bin/node
|
|
|
|
PATH="$PATH:$(dirname "${node}")"
|
|
|
|
|
2020-10-06 18:33:42 +00:00
|
|
|
if ! which node > /dev/null; then
|
2021-06-28 15:48:39 +00:00
|
|
|
echo "node not available"
|
|
|
|
exit 1
|
2020-10-06 18:33:42 +00:00
|
|
|
fi
|
2020-04-28 04:14:33 +00:00
|
|
|
|
|
|
|
if [[ ! -d "./COVID-19" ]]; then
|
|
|
|
git clone --depth 1 https://github.com/CSSEGISandData/COVID-19.git
|
|
|
|
else
|
|
|
|
(cd COVID-19 && git pull)
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm -rf ./public/
|
2020-10-06 18:33:42 +00:00
|
|
|
|
2020-04-28 04:14:33 +00:00
|
|
|
./generate.js
|
|
|
|
|
2022-02-11 09:39:27 +00:00
|
|
|
rsync -vaz ./public/ covid19:/var/www/sites/covid19.tmont.com/live/
|
2020-10-06 18:33:42 +00:00
|
|
|
|
2020-04-28 04:14:33 +00:00
|
|
|
echo
|