mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-24 05:23:06 +00:00
d8385b7f91
* gh: use shallow clones whenever possible * gh: reverted submodule checks * gh: lint: joined linting scripts * gh: renamed linter workflow * check python linter output * gh: reworked linter * checking c linter * gh: merged submodule check & lint * gh: renamed step * gh: removed redundant `submodules: false` Co-authored-by: あく <alleteam@gmail.com>
34 lines
870 B
Bash
Executable file
34 lines
870 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# shellcheck disable=SC2086 source=/dev/null
|
|
# unofficial strict mode
|
|
set -eu;
|
|
|
|
# private variables
|
|
SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd -P)";
|
|
SCONS_DEFAULT_FLAGS="--warn=target-not-built";
|
|
SCONS_EP="python3 -m SCons";
|
|
|
|
# public variables
|
|
FBT_NOENV="${FBT_NOENV:-""}";
|
|
FBT_NO_SYNC="${FBT_NO_SYNC:-""}";
|
|
FBT_TOOLCHAIN_PATH="${FBT_TOOLCHAIN_PATH:-$SCRIPT_PATH}";
|
|
FBT_VERBOSE="${FBT_VERBOSE:-""}";
|
|
|
|
if [ -z "$FBT_NOENV" ]; then
|
|
FBT_VERBOSE="$FBT_VERBOSE" . "$SCRIPT_PATH/scripts/toolchain/fbtenv.sh";
|
|
fi
|
|
|
|
if [ -z "$FBT_VERBOSE" ]; then
|
|
SCONS_DEFAULT_FLAGS="$SCONS_DEFAULT_FLAGS -Q";
|
|
fi
|
|
|
|
if [ -z "$FBT_NO_SYNC" ]; then
|
|
if [ ! -d "$SCRIPT_PATH/.git" ]; then
|
|
echo "\".git\" directory not found, please clone repo via \"git clone\"";
|
|
exit 1;
|
|
fi
|
|
git submodule update --init --depth 1;
|
|
fi
|
|
|
|
$SCONS_EP $SCONS_DEFAULT_FLAGS "$@"
|