mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 05:30:45 +00:00
hooks/post-merge: Skip time updates for directories
This will erroneously lead to synchronization for the entire tree.
This commit is contained in:
parent
d6e9b9db4d
commit
692e74e329
@ -38,6 +38,11 @@ function sync-coreos-config() {
|
||||
# Update timestamp for temporary file to match last commit time, in order to ensure
|
||||
# correct partial updates.
|
||||
for f in "$dir/"**; do
|
||||
# Skip directories, as updating their commit times will have all files within be synchronized.
|
||||
if test -d "$f"; then
|
||||
continue
|
||||
fi
|
||||
|
||||
touch --date="$(git -C "$TEMP_CONFIG_PATH" log -n 1 --pretty=format:%cd --date=iso --date-order -- "$f")" -- "$f"
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user