Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix run_me.sh to work on macOS #101

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions python/examples/bindings/se2-bindings/run_me.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

if [[ "$1" == "--local" ]]; then
if [[ ! -v WASI_SDK_PATH ]]; then
if [ -z "${WASI_SDK_PATH}" ]; then
echo "WASI_SDK_PATH is required. Download wasi-sdk and set the variable"
exit 1
fi
Expand Down Expand Up @@ -32,15 +32,15 @@ fail() {
}

echo -e "\n\n------------------------------------" | tee -a build.log
echo "$(date --iso-8601=ns) Running '$0'" | tee -a build.log
echo "$(date +%Y-%m-%dT%H:%M:%S.%6NZ) Running '$0'" | tee -a build.log

echo -e "$(date --iso-8601=ns) | Building wasm-wrapper-c ${WASI_CMD:+with '$WASI_CMD' }(logs silenced to build.log)..." | tee -a build.log
echo -e "$(date +%Y-%m-%dT%H:%M:%S.%6NZ) | Building wasm-wrapper-c ${WASI_CMD:+with '$WASI_CMD' }(logs silenced to build.log)..." | tee -a build.log
${WASI_CMD} bash -c "cd wasm-wrapper-c; ./build-wasm.sh --clean >>../build.log 2>&1" || fail

echo -e "$(date --iso-8601=ns) | Building se2-mock-runtime ${NODE_CMD:+with '$NODE_CMD' }(logs silenced to build.log)..." | tee -a build.log
echo -e "$(date +%Y-%m-%dT%H:%M:%S.%6NZ) | Building se2-mock-runtime ${NODE_CMD:+with '$NODE_CMD' }(logs silenced to build.log)..." | tee -a build.log
${NODE_CMD} bash -c "cd se2-mock-runtime; npm i >>../build.log 2>&1" || fail

echo -e "$(date --iso-8601=ns) | Running se2-mock-runtime ${NODE_CMD:+with '$NODE_CMD' }..." | tee -a build.log
echo -e "$(date +%Y-%m-%dT%H:%M:%S.%6NZ) | Running se2-mock-runtime ${NODE_CMD:+with '$NODE_CMD' }..." | tee -a build.log
${NODE_CMD} bash -c "cd se2-mock-runtime; set -x; \
node --experimental-wasi-unstable-preview1 . \
--wrapper ../wasm-wrapper-c/target/wasm32-wasi/wasm-wrapper-c.wasm \
Expand Down