diff --git a/assets/chezmoi.io/docs/user-guide/machines/macos.md b/assets/chezmoi.io/docs/user-guide/machines/macos.md index 7a39df3c5a6..3e78a85f5e2 100644 --- a/assets/chezmoi.io/docs/user-guide/machines/macos.md +++ b/assets/chezmoi.io/docs/user-guide/machines/macos.md @@ -34,3 +34,12 @@ machine is connected to. For a stable result, use the `scutil` command: ``` {{ $computerName := output "scutil" "--get" "ComputerName" | trim }} ``` + +## Run script after every macOS update + +You can automate a script to run after each macOS update by creating +a `run_onchange_` script and using the `output` template function to run `sw_vers`: + +``` +# MacOS build version: {{ output "sw_vers" "--buildVersion" }} +```