+ RUST_BACKTRACE=1 "$BIN" "$OUT/" lightning "$OUT_TEMPL" "$OUT_F" "$OUT_CPP"
+popd
+
+HOST_PLATFORM="$(rustc --version --verbose | grep "host:")"
+if [ "$HOST_PLATFORM" = "host: x86_64-apple-darwin" ]; then
+ # OSX sed is for some reason not compatible with GNU sed
+ sed -i '' 's|lightning = { .*|lightning = { path = "'"$LIGHTNING_PATH"'" }|' lightning-c-bindings/Cargo.toml
+else
+ sed -i 's|lightning = { .*|lightning = { path = "'"$LIGHTNING_PATH"'" }|' lightning-c-bindings/Cargo.toml
+fi