diff --git a/build_demo_web.sh b/build_demo_web.sh index 4fab5395e..ea267eb1b 100755 --- a/build_demo_web.sh +++ b/build_demo_web.sh @@ -32,4 +32,13 @@ wasm-bindgen "target/wasm32-unknown-unknown/$BUILD/$TARGET_NAME" \ echo "Finished: docs/${CRATE_NAME}.wasm" -open http://localhost:8888/index.html +if [[ "$OSTYPE" == "linux-gnu"* ]]; then + # Linux, ex: Fedora + xdg-open http://localhost:8888/index.html +elif [[ "$OSTYPE" == "msys" ]]; then + # Windows + start http://localhost:8888/index.html +else + # Darmin aka MacOS or something else + open http://localhost:8888/index.html +fi