File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 15
15
#
16
16
set -euo pipefail -x
17
17
arch=$( uname -m | tr ' [:upper:]' ' [:lower:]' )
18
-
18
+ os=$( uname -s | tr ' [:upper:]' ' [:lower:]' )
19
+ if [ " $os " = " darwin" ]; then
20
+ os=" macos"
21
+ if [ " $arch " = " arm64" ]; then
22
+ arch=" aarch64"
23
+ fi
24
+ else
25
+ os=" linux"
26
+ fi
19
27
ARCH=$arch
20
- VER=v0.35.1
21
- wget https://github.com/bytecodealliance/wasmtime/releases/download/${VER} /wasmtime-${VER} -${ARCH} -linux -c-api.tar.xz
22
- tar -xvf ./wasmtime-${VER} -${ARCH} -linux -c-api.tar.xz > /dev/null
28
+ VER=v0.37.0
29
+ wget https://github.com/bytecodealliance/wasmtime/releases/download/${VER} /wasmtime-${VER} -${ARCH} -${os} -c-api.tar.xz
30
+ tar -xvf ./wasmtime-${VER} -${ARCH} -${os} -c-api.tar.xz > /dev/null
23
31
if [ -d wasmtime-c-api ]; then
24
32
rm -rf wasmtime-c-api
25
33
fi
26
- mv wasmtime-${VER} -${ARCH} -linux -c-api wasmtime-c-api
34
+ mv wasmtime-${VER} -${ARCH} -${os} -c-api wasmtime-c-api
27
35
if echo " int main(void) {}" | gcc -o /dev/null -v -x c - & > /dev/stdout| grep collect | tr -s " " " \012" | grep musl; then
28
36
# build from source code if the libc is musl
29
37
git clone https://github.com/bytecodealliance/wasmtime -b ${VER} --depth 1 \
You can’t perform that action at this time.
0 commit comments