Skip to content

Commit

Permalink
fix chmod
Browse files Browse the repository at this point in the history
  • Loading branch information
cpanse committed Oct 30, 2024
1 parent 8719697 commit 6212fb8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions R/dotNetAssembly.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6212fb8

Please sign in to comment.