micropython-wrapper.sh 830 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. basedir="$(dirname "$0")"
  3. [ "$(echo "$basedir" | cut -c1)" = '/' ] || basedir="$PWD/$basedir"
  4. awlsim_base="$basedir/.."
  5. set -e
  6. if ! [ -x "$awlsim_base/awlsim-test" -a -x "$awlsim_base/setup.py" ]; then
  7. echo "basedir sanity check failed"
  8. exit 1
  9. fi
  10. cd "$awlsim_base"
  11. export MICROPYPATH="$MICROPYPATH:$awlsim_base/libs/tiny_atexit"
  12. export MICROPYPATH="$MICROPYPATH:$awlsim_base/libs/tiny_configparser"
  13. export MICROPYPATH="$MICROPYPATH:$awlsim_base/libs/tiny_csv"
  14. export MICROPYPATH="$MICROPYPATH:$awlsim_base/libs/tiny_datetime"
  15. export MICROPYPATH="$MICROPYPATH:$awlsim_base/libs/tiny_platform"
  16. export MICROPYPATH="$MICROPYPATH:$awlsim_base/libs/tiny_struct"
  17. export MICROPYPATH="$MICROPYPATH:$awlsim_base/libs/tiny_xml"
  18. export MICROPYPATH="$MICROPYPATH:$HOME/.micropython/lib"
  19. exec micropython -X heapsize=512M "$@"