Skip to content

Commit

Permalink
Support download and use of dev.zip from GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Dec 1, 2023
1 parent d94f53c commit cbf7c3f
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tools/fetchTileDBSrc.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,24 @@ if (arg == "default") {
url <- arg
}

if (!file.exists("tiledb.tar,gz")) {
cat(url, " ...\n")
if (!file.exists("tiledb.tar.gz")) {
op <- options()
options(timeout=180)

cat(url, " ...\n")
download.file(url, "tiledb.tar.gz", quiet=TRUE)

## special case of nightly download from GitHub which comes only as a zipfile
## so we first unzip the file now downloaded to tiledb.tar.gz, and then create the tar
if (grepl("zip$", url)) {
cat("Converting zip to tar.gz ...\n")
unzip("tiledb.tar.gz")
unlink("tiledb.tar.gz")
Sys.chmod("TileDB-dev/bootstrap", mode="0755")
options(warn=-1)
tar("tiledb.tar.gz", "TileDB-dev", compression="gzip")
}

options(op)
}
q()

0 comments on commit cbf7c3f

Please sign in to comment.