-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to select tiledb core source tarball for download (#622)
- Loading branch information
1 parent
8583603
commit 19846fd
Showing
4 changed files
with
117 additions
and
21 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,40 @@ | ||
#!/usr/bin/Rscript | ||
|
||
dcffile <- "../tools/tiledbVersion.txt" | ||
if (!file.exists(dcffile)) { | ||
message("TileDB Version file not found.") | ||
## Require one command arg | ||
args <- commandArgs(TRUE) | ||
if (length(args) != 1) { | ||
message("Usage: fetchTileDBSrc.R (default|url)") | ||
message("where 'default' select the given default URL") | ||
message(" 'url' provides an alternative URL to download from") | ||
q() | ||
} | ||
dcf <- read.dcf(dcffile) | ||
ver <- dcf[[1, "version"]] | ||
arg <- args[1] | ||
|
||
## by default we download the source from the given release | ||
url <- paste0("https://github.com/TileDB-Inc/TileDB/archive/", ver, ".tar.gz") | ||
if (arg == "default") { | ||
## Determin the 'default' download from the pin | ||
|
||
cat("Downloading ", url, "\n") | ||
op <- options() | ||
options(timeout=60) | ||
download.file(url, "tiledb.tar.gz", quiet=TRUE) | ||
options(op) | ||
## This is an R script to make it easy to read the dcf format file | ||
dcffile <- "../tools/tiledbVersion.txt" | ||
if (!file.exists(dcffile)) { | ||
message("TileDB Version file not found.") | ||
q() | ||
} | ||
dcf <- read.dcf(dcffile) | ||
ver <- dcf[[1, "version"]] | ||
|
||
## by default we download the source from the given release | ||
url <- paste0("https://github.com/TileDB-Inc/TileDB/archive/", ver, ".tar.gz") | ||
|
||
} else { | ||
## use the given url | ||
url <- arg | ||
} | ||
|
||
if (!file.exists("tiledb.tar,gz")) { | ||
cat("Downloading", url, "\n") | ||
op <- options() | ||
options(timeout=60) | ||
download.file(url, "tiledb.tar.gz", quiet=TRUE) | ||
options(op) | ||
} | ||
q() |