diff --git a/update.sh b/update.sh index 155a6c7..40decb6 100755 --- a/update.sh +++ b/update.sh @@ -6,9 +6,11 @@ dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "${dir}" -. /home/tmont/.nvm/nvm.sh -nvm use -yarn install --production --non-interactive --pure-lockfile +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 @@ -17,8 +19,9 @@ else fi rm -rf ./public/ + ./generate.js -rsync -va ./public/ ./live/ -echo $(date) +rsync -vaz ./public/ tmont@tmont.com:/var/www/sites/covid19.tmont.com/live/ + echo