diff --git a/run-wasm-example.sh b/run-wasm-example.sh index d2dd3acc78..b635b71dc9 100755 --- a/run-wasm-example.sh +++ b/run-wasm-example.sh @@ -1,4 +1,4 @@ -#!/bin/env bash +#!/usr/bin/env bash set -e @@ -9,7 +9,7 @@ echo "Generating bindings..." mkdir -p target/wasm-examples/$1 wasm-bindgen --target web --out-dir target/wasm-examples/$1 target/wasm32-unknown-unknown/debug/examples/$1.wasm cp wasm-resources/index.template.html target/wasm-examples/$1/index.html -sed -i "s/{{example}}/$1/g" target/wasm-examples/$1/index.html +sed -i "" "s/{{example}}/$1/g" target/wasm-examples/$1/index.html # Find a serving tool to host the example SERVE_CMD="" @@ -31,4 +31,4 @@ if [ "$SERVE_CMD" = "" ]; then fi echo "Serving example with $SERVE_CMD at http://localhost:1234" -$SERVE_CMD $SERVE_ARGS \ No newline at end of file +$SERVE_CMD $SERVE_ARGS