#!/usr/bin/env bash

set -eu

cd $(dirname $0)

(
    sed -e '/automatically generated by rust-bindgen/,$d' src/bindings.rs
    bindgen --with-derive-default wrapper.h
) > new-bindings.rs~

mv new-bindings.rs~ src/bindings.rs
