fix: build and cp
This commit is contained in:
@@ -180,7 +180,9 @@ create-src-tar(){
|
||||
--exclude=${BuildRelativeDir}/build/docker/wfc/modules/*/jar/*.jar \
|
||||
--exclude=${BuildRelativeDir}/build/docker/wfc/visual/jar/*.jar \
|
||||
--exclude=${BuildRelativeDir}/bin/cpto205.sh \
|
||||
${WFCRelativeDir} 1>/dev/null
|
||||
--exclude=${BuildRelativeDir}/docs/99-reference \
|
||||
--exclude=${BuildRelativeDir}/docs/100-images \
|
||||
${WFCRelativeDir} 1>/dev/null
|
||||
echo "done"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
git_root_dir=$(dirname $(realpath $0)/../../..)
|
||||
git_root_dir=$(dirname $(dirname $(dirname $(realpath $0))))
|
||||
build_root_dir=${git_root_dir}/build.wfc
|
||||
build_doc_dir=${build_root_dir}/docs/03-configuration
|
||||
local_tars_rel_dir=${build_root_dir}/release/tars
|
||||
@@ -13,7 +13,7 @@ rel_date=$(date +%Y%m%d)
|
||||
passwd=admin123
|
||||
|
||||
usage() {
|
||||
echo "Usage: sh cpto205.sh {rel_date} (format: YYYYMMDD)"
|
||||
echo "Usage: sh cpto205.sh {rel_date}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -25,16 +25,41 @@ quickstart_file=${build_doc_dir}/03-wfc-quickstart.pdf
|
||||
latest_tar_file=$(ls -t ${local_tars_rel_dir}/*${rel_date}* 2>/dev/null | head -n 1)
|
||||
latest_deb_file=$(ls -t ${local_debs_rel_dir}/*${rel_date}* 2>/dev/null | head -n 1)
|
||||
|
||||
# Use expect to automatically answer yes and input password
|
||||
# Use expect to automatically answer yes and input password for SCP commands
|
||||
expect <<EOF
|
||||
set timeout 120
|
||||
EOF
|
||||
|
||||
if [ -n "${latest_deb_file}" ]; then
|
||||
expect <<EOF
|
||||
spawn scp ${latest_tar_file} agtuser@${server_ip_205}:${tars_rel_dir_205}
|
||||
expect {
|
||||
"yes/no" { send "yes\n"; exp_continue }
|
||||
"password:" { send "$passwd\n" }
|
||||
}
|
||||
spawn scp ${latest_deb_file} agtuser@${server_ip_205}:${debs_rel_dir_205}
|
||||
spawn scp ${quickstart_file} agtuser@${server_ip_205}:${wfc_rel_dir_205}
|
||||
expect eof
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ -n "${latest_tar_file}" ]; then
|
||||
expect <<EOF
|
||||
spawn scp ${latest_deb_file} agtuser@${server_ip_205}:${debs_rel_dir_205}
|
||||
expect {
|
||||
"yes/no" { send "yes\n"; exp_continue }
|
||||
"password:" { send "$passwd\n" }
|
||||
}
|
||||
expect eof
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ -f "${quickstart_file}" ]; then
|
||||
expect <<EOF
|
||||
spawn scp ${quickstart_file} agtuser@${server_ip_205}:${wfc_rel_dir_205}
|
||||
expect {
|
||||
"yes/no" { send "yes\n"; exp_continue }
|
||||
"password:" { send "$passwd\n" }
|
||||
}
|
||||
expect eof
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user