diff --git a/configure b/configure index c9638b64d..c3a71022c 100755 --- a/configure +++ b/configure @@ -4,6 +4,18 @@ set -ex cd $(dirname $0)/src +# The duckdb sources are xz-compressed in the tarball to keep it under 5000000 bytes. +# This happens in the cleanup script. + +if [ -f duckdb.tar.xz ]; then + if [ -d duckdb ]; then + echo "Ignoring duckdb.tar.gz because duckdb directory still exists" + rm duckdb.tar.xz + else + tar xJf duckdb.tar.xz + fi +fi + # The purpose of this is to avoid rebuilding duckdb in every CI/CD run. # We set the DUCKDB_R_PREBUILT_ARCHIVE environment variable to a file path # that contains a .tar of all object files. @@ -27,15 +39,3 @@ if [ -f "${DUCKDB_R_PREBUILT_ARCHIVE}" ] && tar -xm -f ${DUCKDB_R_PREBUILT_ARCHI else cp include/to-tar.mk Makevars.duckdb fi - -# The duckdb sources are xz-compressed in the tarball to keep it under 5000000 bytes. -# This happens in the cleanup script. - -if [ -f duckdb.tar.xz ]; then - if [ -d duckdb ]; then - echo "Ignoring duckdb.tar.gz because duckdb directory still exists" - rm duckdb.tar.xz - else - tar xJf duckdb.tar.xz - fi -fi diff --git a/configure.win b/configure.win index c36eaa0cb..7bafe21fb 100755 --- a/configure.win +++ b/configure.win @@ -10,6 +10,18 @@ if [ "$(${R_HOME}/bin/Rscript --vanilla -e 'writeLines(format(getRversion() < "4 gunzip -k librstrtmgr.a.gz fi +# The duckdb sources are xz-compressed in the tarball to keep it under 5000000 bytes. +# This happens in the cleanup script. + +if [ -f duckdb.tar.xz ]; then + if [ -d duckdb ]; then + echo "Ignoring duckdb.tar.gz because duckdb directory still exists" + rm duckdb.tar.xz + else + tar xJf duckdb.tar.xz + fi +fi + # The purpose of this is to avoid rebuilding duckdb in every CI/CD run. # We set the DUCKDB_R_PREBUILT_ARCHIVE environment variable to a file path # that contains a .tar of all object files. @@ -33,10 +45,3 @@ if [ -f "${DUCKDB_R_PREBUILT_ARCHIVE}" ] && tar -xm --force-local -f ${DUCKDB_R_ else cp include/to-tar-win.mk Makevars.duckdb fi - -# The duckdb sources are xz-compressed in the tarball to keep it under 5000000 bytes. -# This happens in the cleanup script. - -if [ -f duckdb.tar.xz ]; then - tar xJf duckdb.tar.xz -fi