2022-07-14 16:24:26 +00:00
|
|
|
#!/bin/sh
|
2022-06-26 12:00:03 +00:00
|
|
|
|
2022-07-14 16:24:26 +00:00
|
|
|
# shellcheck disable=SC2086 source=/dev/null
|
|
|
|
# unofficial strict mode
|
|
|
|
set -eu;
|
2022-06-26 12:00:03 +00:00
|
|
|
|
2022-08-02 14:05:31 +00:00
|
|
|
# private variables
|
2022-07-14 16:24:26 +00:00
|
|
|
SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd -P)";
|
2022-08-02 14:05:31 +00:00
|
|
|
SCONS_DEFAULT_FLAGS="-Q --warn=target-not-built";
|
|
|
|
|
|
|
|
# public variables
|
|
|
|
FBT_NOENV="${FBT_NOENV:-""}";
|
|
|
|
FBT_NO_SYNC="${FBT_NO_SYNC:-""}";
|
|
|
|
FBT_TOOLCHAIN_PATH="${FBT_TOOLCHAIN_PATH:-$SCRIPT_PATH}";
|
2022-06-30 16:06:12 +00:00
|
|
|
|
2022-08-02 14:05:31 +00:00
|
|
|
if [ -z "$FBT_NOENV" ]; then
|
2022-07-14 16:24:26 +00:00
|
|
|
. "$SCRIPT_PATH/scripts/toolchain/fbtenv.sh";
|
|
|
|
fi
|
|
|
|
|
2022-08-02 14:05:31 +00:00
|
|
|
if [ -z "$FBT_NO_SYNC" ]; then
|
2022-07-14 16:24:26 +00:00
|
|
|
if [ ! -d "$SCRIPT_PATH/.git" ]; then
|
|
|
|
echo "\".git\" directory not found, please clone repo via \"git clone --recursive\"";
|
|
|
|
exit 1;
|
2022-07-04 17:38:18 +00:00
|
|
|
fi
|
2022-07-14 16:24:26 +00:00
|
|
|
git submodule update --init;
|
2022-06-26 12:00:03 +00:00
|
|
|
fi
|
|
|
|
|
2022-08-02 14:05:31 +00:00
|
|
|
python3 "$SCRIPT_PATH/lib/scons/scripts/scons.py" $SCONS_DEFAULT_FLAGS "$@"
|