From 65e47e5828b3584150176a39ca7a617365e71b58 Mon Sep 17 00:00:00 2001 From: Colin Dellow Date: Thu, 5 Jul 2018 23:36:30 -0400 Subject: [PATCH] use prebuilt sqlite fixes #31 --- build-sqlite | 5 ++++- make-linux | 22 ++++++++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/build-sqlite b/build-sqlite index c775ca9..77e686d 100755 --- a/build-sqlite +++ b/build-sqlite @@ -15,7 +15,10 @@ fetch_if_needed() { build() { cd sqlite ./configure - make -j$(nproc) + + if [ ! -v PREBUILT ]; then + make -j$(nproc) + fi } main() { diff --git a/make-linux b/make-linux index b0eddd2..d58ea37 100755 --- a/make-linux +++ b/make-linux @@ -33,7 +33,7 @@ install_prerequisites() { build_sqlite() { if [ ! -e ../../sqlite/sqlite3 ]; then - make sqlite + ( cd "../.." && ./build-sqlite ) fi } @@ -61,13 +61,18 @@ add_prebuilt_lib() { } fetch_prebuilt_libs() { - for lib in "${libs[@]}"; do - if [ ! -e "$prebuilt/$lib" ]; then - echo "Fetching prebuilt $lib for Ubuntu $ubuntu" - curl "https://s3.amazonaws.com/cldellow/public/libparquet/$ubuntu/$lib" > tmp.a - mv tmp.a "$prebuilt"/$lib - fi - done + if [ ! -e "$prebuilt"/complete ]; then + ( + cd "$prebuilt" + curl "https://s3.amazonaws.com/cldellow/public/libparquet/$ubuntu/libs.tar.xz" > libs.tar.xz + tar xf libs.tar.xz --xform 's#.*/##' + touch "$prebuilt"/complete + ) + fi + + if [ ! -e "$here"/sqlite/sqlite3 ]; then + ln -s "$prebuilt"/sqlite3 "$here"/sqlite/sqlite3 + fi add_prebuilt_lib "PARQUET_CPP_LIB" libparquet add_prebuilt_lib "LZ4_LIB" liblz4 @@ -84,6 +89,7 @@ fetch_prebuilt_libs() { add_prebuilt_lib "BOOST_REGEX_LIB" libboost_regex add_prebuilt_lib "BOOST_SYSTEM_LIB" libboost_system add_prebuilt_lib "BOOST_FILESYSTEM_LIB" libboost_filesystem + } main() {