mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Correct bash env and sed command (#2066)
On MacOS Big Sur Version 11.6 the script fails because 1) it does #!/bin/env bash instead of #!/usr/bin/env bash and 2) the sed's -i option takes a file extension or "" which I have opted for the latter. With these changes, the script now works as expected.
This commit is contained in:
@@ -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
|
||||
$SERVE_CMD $SERVE_ARGS
|
||||
|
||||
Reference in New Issue
Block a user