Skip to content

Instantly share code, notes, and snippets.

@JTBrinkmann
Last active March 15, 2023 13:57
Show Gist options
  • Save JTBrinkmann/475838560d264dc2178100d12c4f6899 to your computer and use it in GitHub Desktop.
Save JTBrinkmann/475838560d264dc2178100d12c4f6899 to your computer and use it in GitHub Desktop.
wrapper to make cwrsync and DeltaCopy's rsync work, while allowing to have a different ssh.exe in your PATH
rsync.exe --rsh="/bin/ssh" @args
# tested 2023-03-15, SSH keys should also work out of the box
# for using a different port, do e.g. `--rsh="/bin/ssh -p 1234"`
$OldEnvPath = $ENV:PATH
$ENV:PATH = "$PSScriptRoot\;$OldEnvPath"
rsync.exe @args
$ENV:PATH = $OldEnvPath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment