30 lines
507 B
Bash
Executable File
30 lines
507 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
cd "${dir}"
|
|
|
|
node=/home/tmont/.nvm/versions/node/v12.16.2/bin/node
|
|
PATH="$PATH:$(dirname "${node}")"
|
|
|
|
if ! which node > /dev/null; then
|
|
echo "node not available"
|
|
exit 1
|
|
fi
|
|
|
|
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 -vaz ./public/ covid19:/var/www/sites/covid19.tmont.com/live/
|
|
|
|
echo
|