16 lines
665 B
Cheetah
16 lines
665 B
Cheetah
|
{{- if (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) -}}
|
||
|
#!/usr/bin/env bash
|
||
|
|
||
|
{{ includeTemplate "universal/profile" }}
|
||
|
{{ includeTemplate "universal/logg" }}
|
||
|
|
||
|
logg info 'Decrypting SSH keys stored in the `home/.chezmoitemplates/ssh` folder of the Install Doctor repo / fork.'
|
||
|
find "{{ .chezmoi.sourceDir }}/home/.chezmoitemplates/ssh" -type f | while read SSH_FILE; do
|
||
|
logg info 'Decrypting the $(basename "$SSH_FILE") encrypted SSH file'
|
||
|
chezmoi decrypt "$SSH_FILE" > "$HOME/.ssh/$(basename "$SSH_FILE")" || EXIT_CODE=$?
|
||
|
if [ -n "$EXIT_CODE" ]; then
|
||
|
logg warn "Unable to decrypt the file stored in $SSH_FILE"
|
||
|
fi
|
||
|
fi
|
||
|
{{ end -}}
|