Unverified Commit 4c9919a1 authored by Erin Swenson-Healey's avatar Erin Swenson-Healey Committed by GitHub
Browse files

SB_BUILD_FROM_SOURCE=1 triggers local build (#59)

parent 0aeff9f9
...@@ -9,7 +9,7 @@ subm_dir="rust-fil-sector-builder" ...@@ -9,7 +9,7 @@ subm_dir="rust-fil-sector-builder"
git submodule update --init --recursive $subm_dir git submodule update --init --recursive $subm_dir
if download_release_tarball tarball_path "${subm_dir}"; then if [ "${SB_BUILD_FROM_SOURCE}" != "1" ] && download_release_tarball tarball_path "${subm_dir}"; then
tmp_dir=$(mktemp -d) tmp_dir=$(mktemp -d)
tar -C "$tmp_dir" -xzf "$tarball_path" tar -C "$tmp_dir" -xzf "$tarball_path"
...@@ -18,8 +18,10 @@ if download_release_tarball tarball_path "${subm_dir}"; then ...@@ -18,8 +18,10 @@ if download_release_tarball tarball_path "${subm_dir}"; then
cp "${tmp_dir}/lib/pkgconfig/sector_builder_ffi.pc" . cp "${tmp_dir}/lib/pkgconfig/sector_builder_ffi.pc" .
cp "${tmp_dir}/bin/paramcache" . cp "${tmp_dir}/bin/paramcache" .
(>&2 echo "successfully installed prebuilt libsector_builder")
else else
(>&2 echo "failed to find or obtain precompiled assets for ${subm_dir} - falling back to local build") (>&2 echo "building libsector_builder from local sources (dir = ${subm_dir})")
build_from_source "${subm_dir}" build_from_source "${subm_dir}"
mkdir -p include mkdir -p include
...@@ -45,4 +47,6 @@ else ...@@ -45,4 +47,6 @@ else
fi fi
(>&2 echo "WARNING: paramcache was not installed - you may wish to 'cargo install' it") (>&2 echo "WARNING: paramcache was not installed - you may wish to 'cargo install' it")
(>&2 echo "successfully built and installed libsector_builder from source")
fi fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment