latest
This commit is contained in:
parent
1143707b48
commit
2b1caba409
2 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
|||
{{ includeTemplate "universal/logg" }}
|
||||
|
||||
logg info 'Decrypting SSH keys stored in the `home/.chezmoitemplates/ssh` folder of the Install Doctor repo / fork.'
|
||||
find "{{ .chezmoi.sourceDir }}/.chezmoitemplates/ssh" -type f -maxdepth 1 ! -name "*.pub" ! -name "authorized_keys*" ! -name "known_host*" ! -name "config" | while read SSH_FILE; do
|
||||
find "{{ .chezmoi.sourceDir }}/.chezmoitemplates/ssh" -type f | while read SSH_FILE; do
|
||||
### Decrypt SSH file with Chezmoi
|
||||
logg info 'Decrypting the $(basename "$SSH_FILE") encrypted SSH file'
|
||||
chezmoi decrypt "$SSH_FILE" > "$HOME/.ssh/$(basename "$SSH_FILE")" || EXIT_CODE=$?
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
logg info 'Ensuring public keys are present'
|
||||
|
||||
find "$HOME/.ssh" -type f | while read FILE; do
|
||||
find "$HOME/.ssh" -maxdepth 1 ! -name "*.pub" ! -name "authorized_keys*" ! -name "known_host*" ! -name "config" | while read FILE; do
|
||||
if [ ! -f "${FILE}.pub" ]; then
|
||||
logg info 'Generating missing public key for `'"$FILE"'`'
|
||||
ssh-keygen -f "$FILE" -y > "${FILE}.pub"
|
||||
|
|
Loading…
Reference in a new issue