Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/ci/vendor-c-api-headers.sh
1685 views
1
#!/bin/sh
2
3
# Script to re-vendor the headers from the `wasm-c-api` proposal.
4
5
rev="2ce1367c9d1271c83fb63bef26d896a2f290cd23"
6
files="wasm.h wasm.hh"
7
8
set -ex
9
10
for file in $files; do
11
dst=crates/c-api/include/$file
12
pretty_url=https://github.com/WebAssembly/wasm-c-api/blob/$rev/include/$file
13
url=https://raw.githubusercontent.com/WebAssembly/wasm-c-api/$rev/include/$file
14
cat >$dst <<-EOF
15
// Wasmtime-vendored copy of this header file as present in upstream:
16
// <$pretty_url>
17
//
18
// Wasmtime maintainers can update this vendored copy in-tree with the
19
// ./ci/vendor-c-api-headers.sh shell script.
20
//
21
EOF
22
curl $url >> $dst
23
done
24
25