dotfiles/.chezmoiscripts/run_once_before_00-backup-id_25519.fish.tmpl

14 lines
348 B
Cheetah
Raw Normal View History

#!/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