From 6a803c5cf2924ceb49b329566491185709046be2 Mon Sep 17 00:00:00 2001 From: tmont Date: Tue, 6 Oct 2020 11:33:42 -0700 Subject: [PATCH] run update script locally and rsync to remote server --- update.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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