From c808bb6ee7f77f077308a1f06f63dbee6a928f6d Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Thu, 22 Feb 2024 03:17:25 -0800 Subject: git restore-mtime to prevent rsync sync actually not modified files --- upd | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'upd') diff --git a/upd b/upd index afe0bbb..12499da 100755 --- a/upd +++ b/upd @@ -28,6 +28,13 @@ backup () { # Push ka branch to codeberg or any future alternative website for mirroring. Needed for public codes/data, considering my death may result in all copies on my computers being lost. [ "$branch" = ka ] && git push done + # git checkout will change mtime, need to change back so rsync won't think it needs to backup these files + # https://stackoverflow.com/q/1964470/9008720 + # https://stackoverflow.com/q/21735435/9008720 + # https://github.com/MestreLion/git-tools + # aur/git-tools-git + git restore-mtime + ( umask 077 # backup ka cfgl -- cgit v1.2.3-70-g09d2