covid19/update.sh

25 lines
405 B
Bash
Raw Normal View History

2020-04-28 04:14:33 +00:00
#!/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