fbt 739 B

12345678910111213141516171819202122232425262728
  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. # public variables
  9. FBT_NOENV="${FBT_NOENV:-""}";
  10. FBT_NO_SYNC="${FBT_NO_SYNC:-""}";
  11. FBT_TOOLCHAIN_PATH="${FBT_TOOLCHAIN_PATH:-$SCRIPT_PATH}";
  12. if [ -z "$FBT_NOENV" ]; then
  13. . "$SCRIPT_PATH/scripts/toolchain/fbtenv.sh";
  14. fi
  15. if [ -z "$FBT_NO_SYNC" ]; then
  16. if [ ! -d "$SCRIPT_PATH/.git" ]; then
  17. echo "\".git\" directory not found, please clone repo via \"git clone --recursive\"";
  18. exit 1;
  19. fi
  20. git submodule update --init;
  21. fi
  22. python3 "$SCRIPT_PATH/lib/scons/scripts/scons.py" $SCONS_DEFAULT_FLAGS "$@"