You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
754 B
23 lines
754 B
3 years ago
|
#!/bin/bash
|
||
|
|
||
|
read -r ip < ./../vmachine_ip
|
||
|
|
||
|
cur_dir=${PWD##*/}
|
||
|
cur_module=${cur_dir:18}
|
||
|
cur_module_inner=${cur_module//-}
|
||
|
echo $cur_dir
|
||
|
echo $cur_module
|
||
|
echo $cur_module_inner
|
||
|
echo $ip
|
||
|
#because this runs on a VM, paths must be absolute
|
||
|
in=/var/calculate/proj/calculate-utils-3-${cur_module}/pym/calculate/${cur_module_inner}/*
|
||
|
in_contr=/var/calculate/proj/calculate-utils-3-${cur_module}/pym/calculate/contrib/*
|
||
|
out=/usr/lib64/python2.7/site-packages/calculate/${cur_module_inner}/
|
||
|
out_contr=/usr/lib64/python2.7/site-packages/calculate/contrib
|
||
|
|
||
|
set -x
|
||
|
#VM's IP, hopefully you added the pub key
|
||
|
ssh root@$ip rsync -e "ssh" --progress root@192.168.122.1:$in $out -r
|
||
|
ssh root@$ip rsync -e "ssh" --progress root@192.168.122.1:$in_contr $out_contr -r
|
||
|
set +x
|