修复 bug
This commit is contained in:
@@ -102,6 +102,8 @@ upload_path() {
|
||||
|
||||
if [[ -d "$local_full" ]]; then
|
||||
info "上传目录: ${rel_path}/ → ${SERVER}:${remote_path}/"
|
||||
# 先删除远程同名目录,避免 scp 将目录嵌套到已有目录内
|
||||
ssh $SSH_OPTS "$SERVER" "rm -rf '${remote_path}'"
|
||||
scp $SCP_OPTS -r "$local_full" "${SERVER}:${remote_path}"
|
||||
else
|
||||
info "上传文件: ${rel_path} → ${SERVER}:${remote_path}"
|
||||
|
||||
Reference in New Issue
Block a user