From 5edd0ea09105a13b3719615f55d21512d93e0b98 Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Tue, 26 Dec 2023 23:10:36 -0300 Subject: [PATCH] Exclude WSA's .nomedia when syncing .ssh from WSL --- home/.chezmoiscripts/run_after_40-sync-wsl-ssh-keys.sh.tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/home/.chezmoiscripts/run_after_40-sync-wsl-ssh-keys.sh.tmpl b/home/.chezmoiscripts/run_after_40-sync-wsl-ssh-keys.sh.tmpl index 1399714e..4b5db7b5 100644 --- a/home/.chezmoiscripts/run_after_40-sync-wsl-ssh-keys.sh.tmpl +++ b/home/.chezmoiscripts/run_after_40-sync-wsl-ssh-keys.sh.tmpl @@ -8,7 +8,8 @@ true || source ../.chezmoitemplates/scripts-library win_home="$(wslvar USERPROFILE)" win_home="$(wslpath "${win_home}")" -rsync_cmd=(rsync --chmod=F600 --archive --delete --itemize-changes --checksum "${win_home}/.ssh/" "${HOME}/.ssh/") +# The .nomedia file is created automatically by WSA with weird permissions that rsync can't handle +rsync_cmd=(rsync --chmod=F600 --archive --delete --itemize-changes --checksum --exclude .nomedia "${win_home}/.ssh/" "${HOME}/.ssh/") if [[ -f "${win_home}/.ssh/id_rsa" ]] && "${rsync_cmd[@]}" --dry-run | grep --quiet .; then log_task "Syncing .ssh folder from Windows to WSL"