summaryrefslogtreecommitdiff
path: root/upd
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-02-22 03:17:25 -0800
committerXiao Pan <gky44px1999@gmail.com>2024-02-22 03:17:25 -0800
commitc808bb6ee7f77f077308a1f06f63dbee6a928f6d (patch)
tree5ead34a0705afdf19cbe3fe4188c9e8b41f5a7b7 /upd
parent21368d3206f10dc4b5f3223965eea98446285709 (diff)
git restore-mtime to prevent rsync sync actually not modified files
Diffstat (limited to 'upd')
-rwxr-xr-xupd7
1 files changed, 7 insertions, 0 deletions
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