1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-08 05:04:17 +00:00

implement dynamic include for #89

This commit is contained in:
deadc0de6
2019-02-27 08:40:34 +01:00
parent 1e6cce903e
commit 51ce9e39c9
3 changed files with 143 additions and 0 deletions

View File

@@ -778,6 +778,30 @@ profiles:
```
Here profile *host1* contains all the dotfiles defined for *host2* plus `f_xinitrc`.
For more advanced use-cases variables (`variables` and `dynvariables`) can be used
to specify the profile to include in a profile
For example:
```yaml
variables:
var1: "john"
dynvariables:
d_user: "echo $USER"
profiles:
profile_john:
dotfiles:
- f_john_dotfile
profile_bill:
dotfiles:
- f_bill_dotfile
p1:
include:
- "profile_{{@@ d_user @@}}"
p2:
include:
- "profile_{{@@ var1 @@}}"
```
## Ignore empty template
It is possible to avoid having an empty rendered template being