forked from ScoopInstaller/Scoop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rsync-via-git.json
82 lines (82 loc) · 3.91 KB
/
rsync-via-git.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
"##": "Proof of concept to install rsync inside the git package's usr/bin directory (~/scoop/apps/git/current/usr/bin)",
"##": "props to https://github.com/rivy/scoop-bucket/blob/master/rsync.json",
"homepage": "https://git-for-windows.github.io/",
"license": "GPL-2.0-only",
"version": "3.1.3",
"##": "ref: <https://blog.tiger-workshop.com/add-rsync-to-git-bash-for-windows> @@ <https://archive.is/WJCrw>",
"##": "ref: <https://serverfault.com/a/872557/24273> @@ <https://archive.is/rAfUl#20%>",
"architecture": {
"64bit": {
"url": "http://repo.msys2.org/msys/x86_64/rsync-3.1.3-1-x86_64.pkg.tar.xz",
"hash": "c397eba60b48227277c8da49f7fabbe9e6af20ee1e68b402e296e672b7a52a6a"
},
"32bit": {
"url": "http://repo.msys2.org/msys/i686/rsync-3.1.3-1-i686.pkg.tar.xz",
"hash": "e7a7e21a8c894eba97365265beb0e90a42d31109514f74a0a28d22299c856cbf"
}
},
"##": "ref: <https://zsoltfabok.com/blog/2017/03/windows-rsync> @@ <https://archive.is/D8i3C>",
"bin": "../../git/current/usr/bin/rsync.exe",
"notes": [
"NOTE: local paths with a leading '/' or internal ':' must instead be in Cygwin cygpath format (eg, '/c/...')"
],
"pre_install": [
"Write-Host -f darkgray \"Copying '$dir/usr/bin/rsync.exe' to '$(appdir git $global)/current/usr/bin/rsync.exe'\"",
"Copy-Item \"$dir/usr/bin/rsync.exe\" \"$(appdir git $global)/current/usr/bin/rsync.exe\" -Force"
],
"post_install": [
"If ($global) {$target='Machine'} Else {$target='User'}",
"$ssh_path=\"$(scoop which ssh)\"",
"$ssh_path=\"$(resolve-path $ssh_path)\"",
"If (Test-Path $ssh_path) {",
" Write-Host -f darkgray \"Setting %RSYNC_RSH% to $ssh_path for the $target\"",
" [Environment]::SetEnvironmentVariable('RSYNC_RSH', $ssh_path, $target)",
" Write-Host -f darkgray \"Setting %RSYNC_SSH% to $ssh_path for the $target\"",
" [Environment]::SetEnvironmentVariable('RSYNC_SSH', $ssh_path, $target)",
" Write-Host -f darkyellow \"Please restart your command shell for these changes to take effect\"",
"} else {",
" Write-Host -f darkgray \"%RSYNC_RSH% and %RSYNC_SSH% have not been set as ssh.exe was not found in the path\"",
"}"
],
"uninstaller": {
"script": [
"If ($global) {$target='Machine'} Else {$target='User'}",
"If (Test-Path \"$(appdir git $global)/current/usr/bin/rsync.exe\") {",
" Write-Host -f darkgray \"Deleting '$(appdir git $global)/current/usr/bin/rsync.exe'\"",
" Remove-Item -Path \"$(appdir git $global)/current/usr/bin/rsync.exe\" -Force",
"}",
"If ([Environment]::GetEnvironmentVariable('RSYNC_RSH', $target)) {",
" Write-Host -f darkgray \"Removing %RSYNC_RSH% for the $target\"",
" [Environment]::SetEnvironmentVariable('RSYNC_RSH', $null, $target)",
"}",
"If ([Environment]::GetEnvironmentVariable('RSYNC_SSH', $target)) {",
" Write-Host -f darkgray \"Removing %RSYNC_SSH% for the $target\"",
" [Environment]::SetEnvironmentVariable('RSYNC_SSH', $null, $target)",
"}",
"Write-Host -f darkyellow \"Please restart your command shell for these changes to take effect\""
]
},
"depends": [
"git",
"openssh"
],
"provides": [
"rsync"
],
"checkver": {
"url": "http://repo.msys2.org/msys/x86_64/",
"re": "\"rsync-([\\d.-]+)-x86_64\\.pkg\\.tar\\.xz\"",
"reverse": true
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "http://repo.msys2.org/msys/x86_64/rsync-3.1.3-1-x86_64.pkg.tar.xz"
},
"32bit": {
"url": "http://repo.msys2.org/msys/i686/rsync-3.1.3-1-i686.pkg.tar.xz"
}
}
}
}