Add .chezmoiscripts/00-backup-id_25519.fish
This commit is contained in:
parent
b782011ac5
commit
574fc2d44c
1 changed files with 13 additions and 0 deletions
13
.chezmoiscripts/run_once_before_00-backup-id_25519.fish.tmpl
Normal file
13
.chezmoiscripts/run_once_before_00-backup-id_25519.fish.tmpl
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
{{ $sshDir := joinPath .chezmoi.homeDir ".ssh" -}}
|
||||
{{ $pubKey := joinPath $sshDir "id_ed25519.pub" -}}
|
||||
{{ $privKey := joinPath $sshDir "id_ed25519" -}}
|
||||
|
||||
if test -e {{ $pubKey }}
|
||||
mv {{ $pubKey }} {{ printf "%s%s" $pubKey ".bak" }}
|
||||
end
|
||||
|
||||
if test -e {{ $privKey }}
|
||||
mv {{ $privKey }} {{ printf "%s%s" $privKey ".bak" }}
|
||||
end
|
Loading…
Reference in a new issue