fix winscp script

This commit is contained in:
Yuan Chiu 2025-04-25 09:11:10 +08:00
parent de035e2f6d
commit 58765beb6f

View File

@ -5,9 +5,9 @@ vim +PlugInstall +qall
{{ if eq .chezmoi.os "linux" -}}
{{ if or (eq .chezmoi.osRelease.id "manjaro") (eq .chezmoi.osRelease.id "arch") -}}
mkdir ~/.winscp
{{ if and (stat (print .chezmoi.homeDir "/.ssh/config")) (not (stat (print .chezmoi.homeDir "/.winscp/drive_c/users/" .chezmoi.username "/.ssh/config"))) -}}
mkdir -p ~/.winscp
mkdir -p ~/.winscp/drive_c/users/{{ .chezmoi.username }}/.ssh
{{ if and (stat (print .chezmoi.homeDir "/.ssh/config")) (not (stat (print .chezmoi.homeDir "/.winscp/drive_c/users/" .chezmoi.username "/.ssh/config"))) -}}
ln -s ~/.ssh/config ~/.winscp/drive_c/users/{{ .chezmoi.username }}/.ssh/config
{{ end -}}
{{ if and (stat (print .chezmoi.homeDir "/.ssh/known_hosts")) (not (stat (print .chezmoi.homeDir "/.winscp/drive_c/users/" .chezmoi.username "/.ssh/known_hosts"))) -}}