covid19/update.sh
2020-04-27 21:57:53 -07:00

25 lines
405 B
Bash
Executable File

#!/usr/bin/env bash
set -e
dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${dir}"
. /home/tmont/.nvm/nvm.sh
nvm use
yarn install --production --non-interactive --pure-lockfile
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/
./generate.js
rsync -va ./public/ ./live/
echo $(date)
echo