covid19/update.sh

28 lines
521 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}"
if ! which node > /dev/null; then
#. /home/tmont/.nvm/nvm.sh
nvm use
yarn install --production --non-interactive --pure-lockfile
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-04-28 04:14:33 +00:00
./generate.js
2020-10-07 23:06:41 +00:00
rsync -vaz -e "ssh -i /home/tmont/.ssh/nuc-main" ./public/ tmont@tmont.com:/var/www/sites/covid19.tmont.com/live/
2020-04-28 04:14:33 +00:00
echo