run.sh 552 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. set -e
  3. if [ $# -gt 1 ]; then
  4. echo "Usage: $0 [--aot]"
  5. exit 1
  6. fi
  7. APP=out/wasm-apps/custom_section.wasm
  8. if [ $# -eq 1 ]; then
  9. if [ "$1" = "--aot" ]; then
  10. APP=out/wasm-apps/custom_section.aot
  11. else
  12. echo "Usage: $0 [--aot]"
  13. exit 1
  14. fi
  15. fi
  16. if [ ! -f ${APP} ]; then
  17. echo "Error: ${APP} not found"
  18. if [ "$APP" = "out/wasm-apps/custom_section.aot" ]; then
  19. echo "Run ./build.sh --aot first"
  20. else
  21. echo "Run ./build.sh first"
  22. fi
  23. exit 1
  24. fi
  25. out/custom_section -f ${APP}