forked from ScoopInstaller/Versions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rtools35.json
64 lines (64 loc) · 2.9 KB
/
rtools35.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
{
"homepage": "https://cloud.r-project.org/bin/windows/Rtools",
"description": "Tools for building packages for R under Microsoft Windows, or for building R itself. (R 3.3.x - R 3.6.x)",
"license": "BSD-3-Clause",
"version": "3.5.0.4",
"url": "https://cloud.r-project.org/bin/windows/Rtools/Rtools35.exe",
"hash": "18fd63bb9c903e1f9bfce5c9a2600bd24213295760592dbc130b73a61e9d9414",
"innosetup": true,
"installer": {
"script": [
"'r', 'mro' | ForEach-Object {",
" if ((Select-CurrentVersion $_ $global) -match '^3') {",
" $renvloc = (versiondir $_ (Select-CurrentVersion $_ $global) $global) + '\\etc\\Renviron.site'",
" if (Test-Path $renvloc) {",
" $renv = Get-Content $renvloc -Encoding ASCII",
" } else {",
" $renv = @()",
" }",
" if ($architecture -eq '32bit') {",
" $rtoolspath = \"$dir\\bin;$dir\\mingw_32\\bin\"",
" } else {",
" $rtoolspath = \"$dir\\bin;$dir\\mingw_64\\bin\"",
" }",
" if ($renv -cmatch 'PATH=') {",
" $renv = $renv -replace 'PATH=\"(.*)', ('PATH=\"' + $rtoolspath + ';$1')",
" } else {",
" $renv += '\r\nPATH=\"' + $rtoolspath + ';${PATH}\"'",
" }",
" $renv | Set-Content $renvloc -Encoding ASCII",
" }",
"}",
"if (Test-Path 'C:\\Rtools') {",
" if ($null -eq (Get-Item 'C:\\Rtools').LinkType) {",
" Rename-Item -Path 'C:\\Rtools' -NewName 'Rtools.old' -Force",
" } else {",
" Remove-Item -Path 'C:\\Rtools' -Force",
" }",
"}",
"New-Item -Path 'C:\\Rtools' -Target \"$dir\" -ItemType Junction | Out-Null"
]
},
"uninstaller": {
"script": [
"'r', 'mro' | ForEach-Object {",
" if ((Select-CurrentVersion $_ $global) -match '^3') {",
" $renvloc = (versiondir $_ (Select-CurrentVersion $_ $global) $global) + '\\etc\\Renviron.site'",
" if (Test-Path $renvloc) {",
" $renv = Get-Content $renvloc -Encoding ASCII",
" } else {",
" $renv = @()",
" }",
" $renv = $renv -replace '[^;\"]*rtools.*?;', ''",
" $renv | Set-Content $renvloc -Encoding ASCII",
" }",
"}",
"if ((Test-Path 'C:\\Rtools') -and ($null -ne (Get-Item 'C:\\Rtools').LinkType)) {",
" Remove-Item -Path 'C:\\Rtools' -Force",
"}",
"if (Test-Path 'C:\\Rtools.old') {",
" Rename-Item -Path 'C:\\Rtools.old' -NewName 'Rtools' -Force",
"}"
]
}
}