Skip to content

Commit

Permalink
docs: Add example for running script on macOS update
Browse files Browse the repository at this point in the history
  • Loading branch information
KapJI committed Oct 11, 2024
1 parent 4cae323 commit 7416097
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions assets/chezmoi.io/docs/user-guide/machines/macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}
```

0 comments on commit 7416097

Please sign in to comment.