Add .chezmoiscripts/00-backup-id_25519.fish

This commit is contained in:
punkfairie 2024-04-28 17:08:40 -07:00
parent b782011ac5
commit 574fc2d44c
Signed by: punkfairie
GPG key ID: A86AF57F837E320F

View 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