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'