1
0
This commit is contained in:
Jeff Lance 2024-03-04 13:30:21 +01:00
parent f2370447a9
commit 104bbed8c0
2 changed files with 20 additions and 19 deletions

20
home/.chezmoi.toml.tmpl Normal file
View File

@ -0,0 +1,20 @@
{{- $email := promptStringOnce . "email" "Email address " }}
{{- $mbsyncAccountNumber := promptIntOnce . "mbsyncAccountNumber" "How many mbsync accounts would you generate " }}
{{- $mbsyncAccountNumber = $mbsyncAccountNumber | int -}}
[data]
email = {{ $email | quote }}
mbsyncAccountNumber = {{ $mbsyncAccountNumber }}
{{- if gt $mbsyncAccountNumber 0 -}}
{{- range $i, $e := until $mbsyncAccountNumber -}}
{{ $mbsyncAccountName := promptString "MbSync account name " }}
[[data.mbsync]]
name = {{ $mbsyncAccountName | quote }}
email = "accountEmail"
username = "accountUserName"
server = "accountServer"
{{- end -}}
{{- end -}}

View File

@ -1,19 +0,0 @@
{{- $email := promptStringOnce . "email" "Email address " }}
{{- $mbsyncAccountNumber := promptIntOnce . "mbsyncAccountNumber" "How many mbsync accounts would you generate " }}
{{- $mbsyncAccountNumber = $mbsyncAccountNumber | int -}}
data:
email: {{ $email | quote }}
mbsyncAccountNumber: {{ $mbsyncAccountNumber }}
{{- if gt $mbsyncAccountNumber 0 -}}
mbsync:
{{- range $i, $e := until $mbsyncAccountNumber -}}
{{ $mbsyncAccountName := promptString "MbSync account name " }}
- name: {{ $mbsyncAccountName }}
email: "accountEmail"
username: "accountUserName"
server: "accountServer"
{{- end -}}
{{- end -}}