Skip to content

External files that require multiple extraction steps #2682

Answered by twpayne
woolsweater asked this question in Q&A
Discussion options

You must be logged in to vote

One simple solution is to add the extracted font files in ~/Library/Fonts directly to your dotfiles repo, i.e. run

$ chezmoi add ~/Library/Fonts/SF-*.otf

This is declarative, at the expense of making updates to the fonts a manual process.

It would be theoretically possible to use .chezmoiexternal.filter where the filter is a script that you've written that performs the necessary steps to convert the .dmg into a an archive that chezmoi can unpack. However, this would be very inefficient in practice because chezmoi would need to apply the filter every time you run chezmoi diff or chezmoi apply to see if anything has changed.

Although declarative approaches are nice, in practice a run_once_

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by woolsweater
Comment options

You must be logged in to vote
7 replies
@twpayne
Comment options

@halostatue
Comment options

@woolsweater
Comment options

@twpayne
Comment options

@halostatue
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants