update diff_cp

This commit is contained in:
6543 2023-02-27 18:49:21 +01:00
parent 4cedaaf1ec
commit cfeebd892c

View File

@ -36,7 +36,8 @@ cat "$md5_tmp" | while read line; do
mkdir -p "$file_aim_dir" mkdir -p "$file_aim_dir"
if [ -f "${file_aim}" ]; then if [ -f "${file_aim}" ]; then
echo "${file_md5} ${file_aim}" >> ${md5_conflict} echo "${file_md5} ${file_aim}" >> ${md5_conflict}
echo "ERROR: ${file_md5} already exist, skipping" sed -i "/$file_md5/d" "$md5"
echo "ERROR: ${file_aim} already exist, skipping"
else else


file_md5_new=$(cat "${file_orig}" | tee "${file_aim}" | md5sum | cut -c -32) file_md5_new=$(cat "${file_orig}" | tee "${file_aim}" | md5sum | cut -c -32)