mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 13:40:45 +00:00
hooks/post-merge: Ensure correct directory for git
Commands for updating timestamps of source files based on `git commit` times need to run in the correct directory for the git repository in question; this isn't always the same as the initially cloned repository.
This commit is contained in:
parent
9a0e6ba521
commit
821c5e4625
@ -43,7 +43,7 @@ function sync-coreos-config() {
|
||||
continue
|
||||
fi
|
||||
|
||||
touch -t "$(git -C "$TEMP_CONFIG_PATH" log -n 1 --pretty=format:%cd --date=format:%Y%m%d%H%M.%S --date-order -- "$f")" -- "$f"
|
||||
touch -t "$(cd "$dir" && git log -n 1 --pretty=format:%cd --date=format:%Y%m%d%H%M.%S --date-order -- "$f")" -- "$f"
|
||||
done
|
||||
|
||||
# Copy files from temporary directory to host configuration directory.
|
||||
|
Loading…
Reference in New Issue
Block a user