This commit is contained in:
2023-04-21 17:03:14 +08:00
parent 93364b1057
commit 34698b710e
2 changed files with 13 additions and 10 deletions

View File

@@ -34,15 +34,8 @@ if [ "$verbose" = true ]; then
echo "正在从 $source_dir 复制文件到 $destination_dir"
fi
# 使用mv命令覆盖同名文件
for file in "$source_dir"/*; do
if [ -f "$file" ]; then
cp -f "$file" "$destination_dir"
if [ "$verbose" = true ]; then
echo "已复制 $file 到 $destination_dir"
fi
fi
done
# 使用cp命令覆盖同名文件
cp -rf "$source_dir"/* "$destination_dir"
echo "文件复制完成!"
exit 0