From 6212fb8be78b409efd71116dbd4529d8ed23bbdd Mon Sep 17 00:00:00 2001 From: Christian Panse Date: Wed, 30 Oct 2024 17:29:27 +0100 Subject: [PATCH] fix chmod --- R/dotNetAssembly.R | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/R/dotNetAssembly.R b/R/dotNetAssembly.R index 46ac310..2cf2da0 100644 --- a/R/dotNetAssembly.R +++ b/R/dotNetAssembly.R @@ -254,9 +254,24 @@ installRawrrExe <- dir.create(rawrrAssemblyPath(), recursive = TRUE) } + if (exists('RAWRRDOTNET')){ + sourceUrl = "https://fgcz-ms.uzh.ch/~cpanse/rawrr/dotnet/" + if (Sys.info()['sysname'] == "Darwin"){ + file.path(sourceUrl, 'osx-x64', 'rawrr') -> sourceUrl + } else if (Sys.info()['sysname'] == "Linux"){ + file.path(sourceUrl, 'linux-x64', 'rawrr') -> sourceUrl + } else { + file.path(sourceUrl, 'win-x64', 'rawrr.exe') -> sourceUrl + } + message("Overwrite sourceUrl to ", sourceUrl) + } + rawrrAssembly <- .rawrrAssembly() + dir.create(dirname(rawrrAssembly), recursive = TRUE, showWarnings = FALSE) + rv = download.file(sourceUrl, destfile = rawrrAssembly, mode='wb', ...) + Sys.chmod(rawrrAssembly, mode = "0777", use_umask = TRUE) message(sprintf("MD5 %s %s", tools::md5sum(rawrrAssembly), rawrrAssembly)) rv