From 07e3800ba7715feb2322e7d8cc08d3bd3b238d82 Mon Sep 17 00:00:00 2001 From: linsui <36977733+linsui@users.noreply.github.com> Date: Fri, 16 Aug 2019 16:25:38 +0800 Subject: [PATCH] R: add au.hash (#329) --- bucket/r.json | 63 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/bucket/r.json b/bucket/r.json index 04a48924f4..6a7fd73668 100644 --- a/bucket/r.json +++ b/bucket/r.json @@ -3,24 +3,49 @@ "description": "A free software environment for statistical computing and graphics.", "version": "3.6.1", "license": "GPL-2.0-only", + "url": "https://cloud.r-project.org/bin/windows/base/R-3.6.1-win.exe", + "hash": "md5:f6ca2ecfc66a10a196991b6b6c4e91f6", + "innosetup": true, "architecture": { "64bit": { - "url": "https://cran.rstudio.com/bin/windows/base/R-3.6.1-win.exe", - "hash": "8019bdc376ed22c657b2441d15f2b9c6f9507fbffe896534fc2d364021f1c930", - "pre_install": "copy-item -recurse \"$dir\\bin\\x64\" \"$dir\\bin\\curr_arch\"" + "pre_install": "Rename-Item \"$dir\\bin\\R,2.exe\" 'R.exe'", + "bin": [ + "bin\\x64\\R.exe", + "bin\\x64\\Rcmd.exe", + "bin\\x64\\Rgui.exe", + "bin\\x64\\Rscript.exe", + "bin\\x64\\Rterm.exe" + ], + "shortcuts": [ + [ + "bin\\x64\\Rgui.exe", + "R" + ] + ] }, "32bit": { - "url": "https://cran.rstudio.com/bin/windows/base/R-3.6.1-win.exe", - "hash": "8019bdc376ed22c657b2441d15f2b9c6f9507fbffe896534fc2d364021f1c930", - "pre_install": "copy-item -recurse \"$dir\\bin\\i386\" \"$dir\\bin\\curr_arch\"" + "pre_install": "Rename-Item \"$dir\\bin\\R,1.exe\" 'R.exe'", + "bin": [ + "bin\\i386\\R.exe", + "bin\\i386\\Rcmd.exe", + "bin\\i386\\Rgui.exe", + "bin\\i386\\Rscript.exe", + "bin\\i386\\Rterm.exe" + ], + "shortcuts": [ + [ + "bin\\i386\\Rgui.exe", + "R" + ] + ] } }, - "innosetup": true, - "bin": [ - "bin\\curr_arch\\r.exe", - "bin\\curr_arch\\rterm.exe", - "bin\\curr_arch\\rscript.exe" - ], + "installer": { + "script": [ + "Remove-Item \"$dir\\bin\\R,*.exe\" -Force", + "Copy-Item \"$dir\\bin\\R.exe\" \"$dir\\bin\\Rscript.exe\"" + ] + }, "notes": [ "You'll need to type 'r.ps1' or 'r.cmd' to run R, because in Powershell 'r' runs the last command. Alternatively 'rterm' can be used to start the interactive R terminal session.", "", @@ -32,17 +57,13 @@ "Annoying, right?! You might want to check out Pshazz (scoop install pshazz)--this has a plugin to remove some crazy aliases from Powershell, as well as many other improvements." ], "checkver": { - "url": "https://cran.rstudio.com/bin/windows/base/", - "re": "

R-([\\d.]+)" + "url": "https://cloud.r-project.org/bin/windows/base/md5sum.txt", + "regex": "R-([\\d.]+)" }, "autoupdate": { - "architecture": { - "64bit": { - "url": "https://cran.rstudio.com/bin/windows/base/R-$version-win.exe" - }, - "32bit": { - "url": "https://cran.rstudio.com/bin/windows/base/R-$version-win.exe" - } + "url": "https://cloud.r-project.org/bin/windows/base/R-$version-win.exe", + "hash": { + "url": "$baseurl/md5sum.txt" } } }