fix winscp script

This commit is contained in:
Yuan Chiu 2025-04-25 09:04:53 +08:00
parent 970e3bb27f
commit de035e2f6d

View File

@ -5,14 +5,16 @@ vim +PlugInstall +qall
{{ if eq .chezmoi.os "linux" -}} {{ if eq .chezmoi.os "linux" -}}
{{ if or (eq .chezmoi.osRelease.id "manjaro") (eq .chezmoi.osRelease.id "arch") -}} {{ 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"))) -}} {{ if and (stat (print .chezmoi.homeDir "/.ssh/config")) (not (stat (print .chezmoi.homeDir "/.winscp/drive_c/users/" .chezmoi.username "/.ssh/config"))) -}}
mkdir -p ~/.winscp/drive_c/users/{{ .chezmoi.username }}/.ssh
ln -s ~/.ssh/config ~/.winscp/drive_c/users/{{ .chezmoi.username }}/.ssh/config ln -s ~/.ssh/config ~/.winscp/drive_c/users/{{ .chezmoi.username }}/.ssh/config
{{ end -}} {{ end -}}
{{ if and (stat (print .chezmoi.homeDir "/.ssh/known_hosts")) (not (stat (print .chezmoi.homeDir "/.winscp/drive_c/users/" .chezmoi.username "/.ssh/known_hosts"))) -}} {{ if and (stat (print .chezmoi.homeDir "/.ssh/known_hosts")) (not (stat (print .chezmoi.homeDir "/.winscp/drive_c/users/" .chezmoi.username "/.ssh/known_hosts"))) -}}
ln -s ~/.ssh/known_hosts ~/.winscp/drive_c/users/{{ .chezmoi.username }}/.ssh/known_hosts ln -s ~/.ssh/known_hosts ~/.winscp/drive_c/users/{{ .chezmoi.username }}/.ssh/known_hosts
{{ end -}} {{ end -}}
{{ if and (stat (print .chezmoi.homeDir "/.config/filezilla/sitemanager.xml")) (not (stat (print .chezmoi.homeDir "/.winscp/drive_c/users/" .chezmoi.username "/AppData/Roaming/FileZilla/sitemanager.xml"))) -}} {{ if and (stat (print .chezmoi.homeDir "/.config/filezilla/sitemanager.xml")) (not (stat (print .chezmoi.homeDir "/.winscp/drive_c/users/" .chezmoi.username "/AppData/Roaming/FileZilla/sitemanager.xml"))) -}}
mkdir -p ~/.winscp/drive_c/users/{{ .chezmoi.username }}/AppData/Roaming/FileZilla
ln -s ~/.config/filezilla/sitemanager.xml ~/.winscp/drive_c/users/{{ .chezmoi.username }}/AppData/Roaming/FileZilla/sitemanager.xml ln -s ~/.config/filezilla/sitemanager.xml ~/.winscp/drive_c/users/{{ .chezmoi.username }}/AppData/Roaming/FileZilla/sitemanager.xml
{{ end -}} {{ end -}}