#!/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 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 -e "ssh -i /home/tmont/.ssh/nuc-main" ./public/ tmont@tmont.com:/var/www/sites/covid19.tmont.com/live/ echo