use prebuilt sqlite

fixes #31
This commit is contained in:
Colin Dellow 2018-07-05 23:36:30 -04:00
parent 2732f9885a
commit 65e47e5828
2 changed files with 18 additions and 9 deletions

View File

@ -15,7 +15,10 @@ fetch_if_needed() {
build() {
cd sqlite
./configure
if [ ! -v PREBUILT ]; then
make -j$(nproc)
fi
}
main() {

View File

@ -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
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
done
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() {