mirror of
https://github.com/fluencelabs/aquavm
synced 2024-12-04 15:20:16 +00:00
Allow build_wasm.sh work on MacOS (#125)
This commit is contained in:
parent
0528eb485a
commit
257ec06e0e
@ -9,10 +9,18 @@
|
||||
wasm-pack build ./air-interpreter --no-typescript --release -d ../avm/client/wasm
|
||||
)
|
||||
|
||||
## base64 on MacOS doesn't have -w option
|
||||
if echo | base64 -w0 > /dev/null 2>&1;
|
||||
then
|
||||
BASE64=$(base64 -w0 wasm/air_interpreter_client_bg.wasm)
|
||||
else
|
||||
BASE64=$(base64 wasm/air_interpreter_client_bg.wasm)
|
||||
fi
|
||||
|
||||
cat << EOF > ./src/wasm.js
|
||||
// auto-generated
|
||||
|
||||
module.exports = "$(base64 -w0 wasm/air_interpreter_client_bg.wasm)";
|
||||
module.exports = "$BASE64";
|
||||
EOF
|
||||
|
||||
callserviceimpl=$(cat wasm/air_interpreter_client_bg.js | grep -o '__wbg_callserviceimpl_\w*')
|
||||
|
Loading…
Reference in New Issue
Block a user