How to run a script when the interpreted contents of a template file changes #4325
-
EDITED (To describe the problem more clearly) Parts of my files tree:
#!/bin/bash
set -eufo pipefail
# Brewfile hash: {{ include ".chezmoitemplates/homebrew/Brewfile_darwin.tmpl" | sha256sum }}
brew bundle --global
You can see that I am now using the hash of Is there any way to use the hash of |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Can anyone tell me the difference between the two? This would be very helpful for me to understand the template, thank you all very much. |
Beta Was this translation helpful? Give feedback.
include
will include the literal contents of your template before it is executed. You need to useincludeTemplate
instead which includes the result of the template.