From 85c406e191f80857b69c0c2c89902a8dbf40f643 Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Sun, 1 Dec 2019 14:23:46 -0600 Subject: [PATCH] Maintain rsync efficiency with patches --- apply | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apply b/apply index de544d7..54a869b 100755 --- a/apply +++ b/apply @@ -173,6 +173,12 @@ do do meh "... ${patch##*/}" ( cd "${prep_fs}"; patch -p0 ) < "${patch}" || wtf "patch failed" + # Maintain rsyncability in the face of patches + sed -e '/^+++ /!d; s/^+++ //; s/ .*$//' "${patch}" | while read file + do + rm -f "${prep_fs}/${file}.orig" + touch -r "${patch}" "${prep_fs}/${file}" + done done done -- 2.42.0