-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[r] Use artifacts if no args or system libs found
- Loading branch information
1 parent
6efb735
commit a41088d
Showing
4 changed files
with
151 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env Rscript | ||
|
||
## version pinning info (NB: temporary from test repo url below) | ||
tiledb_soma_version <- "0.0.0.11.9026" | ||
tiledb_soma_sha1 <- "39be1e2" | ||
##tiledb_soma_repo <- "single-cell-data/TileDB-SOMA" | ||
tiledb_soma_repo <- "eddelbuettel/tldbsm2" | ||
|
||
if ( ! dir.exists("inst/") ) { | ||
stop("No 'inst/' directory. Exiting.", call. = FALSE) | ||
} | ||
|
||
makeUrl <- function(arch, repo=tiledb_soma_repo, ver=tiledb_soma_version, sha1=tiledb_soma_sha1) { | ||
sprintf("https://github.com/%s/releases/download/%s/libtiledbsoma-%s-%s-%s.tar.gz", ver, arch, ver, sha1) | ||
} | ||
|
||
isX86 <- Sys.info()["machine"] == "x86_64" | ||
isMac <- Sys.info()["sysname"] == "Darwin" | ||
isLinux <- Sys.info()["sysname"] == "Linux" | ||
|
||
if (isMac && isX86) { | ||
url <- makeUrl("macos-x86_64") | ||
} else if (isMac && !isX86) { | ||
url <- makeUrl("macos-arm64") | ||
} else if (isLinux) { | ||
url <- makeUrl("linux-x86_64") | ||
} else { | ||
stop("Unsupported platform for downloading artifacts. Please have TileDB Core installed locally.") | ||
} | ||
|
||
tarball <- "libtiledbsoma.tar.gz" | ||
if (!file.exists(tarball)) download.file(url, tarball, quiet=TRUE) | ||
if (!dir.exists("inst/tiledbsoma")) untar(tarball, exdir="inst/tiledbsoma") |