Skip to content

Commit e1eab92

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 e1eab92

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

bucket/rsync-msys2.json

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

0 commit comments

Comments
 (0)