重新设置代码格式
This commit is contained in:
+1
-8
@@ -5,16 +5,12 @@
|
||||
# ** This session may be vulnerable to "store now, decrypt later" attacks.
|
||||
# ** The server may need to be upgraded. See https://openssh.com/pq.html
|
||||
|
||||
|
||||
|
||||
# C:\msys64\msys2_shell.cmd
|
||||
# -mingw64 -defterm -no-start -here
|
||||
|
||||
|
||||
ver_dir_name="v1.0.3"
|
||||
dstHost="192.168.1.101"
|
||||
|
||||
|
||||
tmp_dir="/c/Users/wyc/Desktop/version_control/tmp"
|
||||
file_name="ecap_server"
|
||||
|
||||
@@ -28,11 +24,9 @@ dstUser="heco"
|
||||
dst_dir="/home/heco/ys_ecap_server/${ver_dir_name}"
|
||||
DST_PASS="123456"
|
||||
|
||||
|
||||
sshpass -p "123" scp -o StrictHostKeyChecking=no "${srcUser}@${srcHost}:${src_dir}/${file_name}" "${tmp_dir}"
|
||||
sshpass -p "123456" scp -o StrictHostKeyChecking=no "${tmp_dir}/${file_name}" "${dstUser}@${dstHost}:${dst_dir}"
|
||||
|
||||
|
||||
#expect
|
||||
|
||||
# 合并执行
|
||||
@@ -41,7 +35,6 @@ sshpass -p "123456" scp -o StrictHostKeyChecking=no "${tmp_dir}/${file_name}" "$
|
||||
# sshpass -p "$DST_PASS" ssh "${dstUser}@${dstHost}" "cat > ${dst_dir}/${file_name}"
|
||||
#
|
||||
|
||||
|
||||
# 检查 SCP 命令的返回值
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "传输成功!"
|
||||
@@ -50,4 +43,4 @@ else
|
||||
fi
|
||||
|
||||
#echo "按任意键继续..."
|
||||
#read -n 1 -s
|
||||
#read -n 1 -s
|
||||
|
||||
Reference in New Issue
Block a user