From 54a8a6b7d9b8e130045394009528ab872d11fc9b Mon Sep 17 00:00:00 2001 From: Mitchell Date: Mon, 29 Jan 2018 23:10:16 +0000 Subject: [PATCH] updated copy build script --- copy_build_prod.sh.template | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/copy_build_prod.sh.template b/copy_build_prod.sh.template index d5832b0..f5e105d 100755 --- a/copy_build_prod.sh.template +++ b/copy_build_prod.sh.template @@ -1,4 +1,11 @@ # this script is to copy the built project to a production server -scp -i prod_ssh_key -r ./_build root@:/home -scp -i prod_ssh_key ./run_prod.sh root@:/home + +if [[ $# -eq 1 ]]; then + ssh -i prod_ssh_key root@10.1.96.4 "mkdir /home/$1"; + scp -i prod_ssh_key -pr ./_build root@10.1.96.4:/home/$1/_build; + scp -i prod_ssh_key ./run_prod.sh root@10.1.96.4:/home/$1/run_prod.sh; + exit 0 +fi + +echo 'Please add version number as an argument'