fbt 727 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. # shellcheck disable=SC2086 source=/dev/null
  3. # unofficial strict mode
  4. set -eu;
  5. # private variables
  6. SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd -P)";
  7. SCONS_DEFAULT_FLAGS="-Q --warn=target-not-built";
  8. SCONS_EP="python3 -m SCons"
  9. # public variables
  10. FBT_NOENV="${FBT_NOENV:-""}";
  11. FBT_NO_SYNC="${FBT_NO_SYNC:-""}";
  12. FBT_TOOLCHAIN_PATH="${FBT_TOOLCHAIN_PATH:-$SCRIPT_PATH}";
  13. if [ -z "$FBT_NOENV" ]; then
  14. . "$SCRIPT_PATH/scripts/toolchain/fbtenv.sh";
  15. fi
  16. if [ -z "$FBT_NO_SYNC" ]; then
  17. if [ ! -d "$SCRIPT_PATH/.git" ]; then
  18. echo "\".git\" directory not found, please clone repo via \"git clone --recursive\"";
  19. exit 1;
  20. fi
  21. git submodule update --init;
  22. fi
  23. $SCONS_EP $SCONS_DEFAULT_FLAGS "$@"