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.
calculate-utils-3-lib/push_to_vmachine_py3

22 lines
522 B

#!/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
#for py3 push it together with contrib
in=/var/calculate/proj/calculate-utils-3-${cur_module}/pym/calculate/*
out=/usr/lib/python3.9/site-packages/calculate/
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
set +x