Skip to content

Commit

Permalink
Ensure default build works
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Dec 1, 2023
1 parent c1cc121 commit d94f53c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
34 changes: 17 additions & 17 deletions tools/fetchTileDB.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

set -eu

if [ $# -lt 1 ] || { [ "$1" != "linux" ] && [ "$1" != "macos" ] && [ "$1" != "url" ]; }; then
echo "Usage: fetchTileDB.sh (linux|macos|url) (givenurl|machine)"
echo "where 'givenurl' and 'machine' are optional"
Expand All @@ -18,34 +20,32 @@ if [ ! -d tinytest ]; then
exit 1
fi

## CRAN wants us permit different R binaries via different PATHs
: ${R_HOME=`R RHOME`}

tarball="tiledb.tar.gz"

## Download if need be
if [ ! -f "${tarball}" ]; then
##echo "downloading '${tarball}'"
## CRAN wants us permit different R binaries via different PATHs
if [ x"${R_HOME}" = x ]; then
R_HOME=`R RHOME`
fi
${R_HOME}/bin/Rscript ../tools/fetchTileDBLib.R ${os} ${url}
fi

## Clean-up just in case
#if [ -d tiledb ]; then
# rm -rf tiledb
#fi
if [ -d tiledb ]; then
rm -rf tiledb
fi

## Expand tarball
#if [ ! -d tiledb ]; then
# mkdir tiledb
# tar vxzf ${tarball} -C tiledb
# rm ${tarball}
# ls -a tiledb
#fi
if [ ! -d tiledb ]; then
mkdir tiledb
tar xzf ${tarball} -C tiledb
rm ${tarball}
fi

## Copy tiledb/lib/ so that rpath relative path also works from
## source i.e. before the inst/ directory tree is installed
#if [ ! -d ../tiledb/lib ]; then
# mkdir -p ../tiledb/lib/
# cp -a tiledb/lib/* ../tiledb/lib/
#fi
if [ ! -d ../tiledb/lib ]; then
mkdir -p ../tiledb/lib/
cp -a tiledb/lib/* ../tiledb/lib/
fi
2 changes: 0 additions & 2 deletions tools/fetchTileDBLib.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,3 @@ op <- options()
options(timeout=180)
download.file(dlurl, "tiledb.tar.gz", quiet=TRUE)
options(op)
print(file.info("tiledb.tar.gz"))
system("tar tfva tiledb.tar.gz | head")

0 comments on commit d94f53c

Please sign in to comment.