Skip to content

Commit 03c3413

Browse files
committed
Added rsync compatible with git (so no /cygdrive/c/mydir but just /c/mydir) and also the compatible sshgit symlink since windows might overshadow ssh path and create problems.
1 parent 6e74afb commit 03c3413

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

bucket/rsync-msys2.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"version": "3.4.1-1",
3+
"description": "Rsync (MSYS2 build, Windows) with all required runtime DLLs (standalone, portable).\nSee https://mirror.msys2.org/msys/x86_64",
4+
"homepage": "https://rsync.samba.org/",
5+
"license": "GPL-3.0-or-later",
6+
"url": [
7+
"https://mirror.msys2.org/msys/x86_64/rsync-3.4.1-1-x86_64.pkg.tar.zst",
8+
"https://mirror.msys2.org/msys/x86_64/libxxhash-0.8.2-1-x86_64.pkg.tar.zst"
9+
],
10+
"hash": [
11+
"ced7a6d0cd397b13f1a24e73928674d6f973ee50a7467526047b1f4721b81683",
12+
"eab25c81694da8efae1579bfcdb49f31fcdf4a1b8c0f5496c1cb23ea9064aee6"
13+
],
14+
"extract_dir": "usr/bin",
15+
"bin": "rsync.exe",
16+
"post_install": [
17+
"$dll = Get-ChildItem \"$dir\\..\" -Recurse -Filter msys-xxhash-0.dll | Select-Object -First 1",
18+
"if ($dll) {",
19+
" Write-Host \"Copying $($dll.FullName) to $dir\\msys-xxhash-0.dll\"",
20+
" Copy-Item $dll.FullName \"$dir\\msys-xxhash-0.dll\" -Force",
21+
"} else {",
22+
" Write-Host \"msys-xxhash-0.dll not found in any subfolder of $dir\\..\"",
23+
" Get-ChildItem -Path \"$dir\\..\" -Recurse | Write-Host",
24+
"}",
25+
"Remove-Item \"$dir\\usr\", \"$dir\\rsync-ssl\" -Recurse -Force -ErrorAction SilentlyContinue",
26+
"Get-ChildItem -Path $dir -Filter '.*' | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue",
27+
"$gitssh = \"$(appdir git)\\current\\usr\\bin\\ssh.exe\"",
28+
"$shimdir = \"$scoopdir\\shims\"",
29+
"$symlink = \"$shimdir\\sshgit.exe\"",
30+
"Write-Host \"Creating symlink in shims: $symlink -> $gitssh (for rsync -e)\"",
31+
"if (!(Test-Path $symlink)) {",
32+
" cmd /c mklink $symlink $gitssh",
33+
"} else {",
34+
" Write-Host \"Symlink already exists: $symlink\"",
35+
"}"
36+
],
37+
"pre_uninstall": [
38+
"$symlink = \"$scoopdir\\shims\\sshgit.exe\"",
39+
"if (Test-Path $symlink) {",
40+
" Write-Host \"Removing symlink: $symlink\"",
41+
" Remove-Item $symlink -Force",
42+
"} else {",
43+
" Write-Host \"Symlink not found: $symlink\"",
44+
"}"
45+
],
46+
"checkver": {
47+
"url": "https://packages.msys2.org/api/search?query=rsync&qtype=binpkg",
48+
"jsonpath": "$.results.exact.version"
49+
},
50+
"autoupdate": {
51+
"url": [
52+
"https://mirror.msys2.org/msys/x86_64/rsync-$version-x86_64.pkg.tar.zst",
53+
"https://mirror.msys2.org/msys/x86_64/libxxhash-0.8.2-1-x86_64.pkg.tar.zst"
54+
],
55+
"hash": [
56+
"ced7a6d0cd397b13f1a24e73928674d6f973ee50a7467526047b1f4721b81683",
57+
"eab25c81694da8efae1579bfcdb49f31fcdf4a1b8c0f5496c1cb23ea9064aee6"
58+
]
59+
},
60+
"notes": [
61+
"This is a portable MSYS2-based rsync for Windows.\nIf rsync needs the use of ssh you can use sshgit that was installed as a symlink to git ssh (windows might overwrite path and collude that).\nExample: rsync -avz -e sshgit"
62+
]
63+
}

0 commit comments

Comments
 (0)