init
This commit is contained in:
39
cpto50.sh
Executable file
39
cpto50.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
latest_jar_file=./projects/agt-cloud/agt-server/target/agt-server.jar
|
||||
latest_dist_file=./projects/agt-web/apps/web-antd/dist.zip
|
||||
server_ip_50=192.168.9.50
|
||||
debs_rel_dir=~/agt/
|
||||
passwd=admin123
|
||||
|
||||
if [ -n "${latest_jar_file}" ]; then
|
||||
expect <<EOF
|
||||
set timeout -1
|
||||
spawn rsync -avz ${latest_jar_file} manager@${server_ip_50}:${debs_rel_dir}
|
||||
expect {
|
||||
"yes/no" {
|
||||
send "yes\n"
|
||||
exp_continue
|
||||
}
|
||||
"password:" { send "$passwd\n" }
|
||||
}
|
||||
expect eof
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ -n "${latest_dist_file}" ]; then
|
||||
expect <<EOF
|
||||
set timeout -1
|
||||
spawn rsync -avz ${latest_dist_file} manager@${server_ip_50}:${debs_rel_dir}
|
||||
expect {
|
||||
"yes/no" {
|
||||
send "yes\n"
|
||||
exp_continue
|
||||
}
|
||||
"password:" { send "$passwd\n" }
|
||||
}
|
||||
expect eof
|
||||
EOF
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user