Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/fbt
diff options
context:
space:
mode:
authorMax Andreev <drunkbatya.js@gmail.com>2022-07-14 19:24:26 +0300
committerGitHub <noreply@github.com>2022-07-14 19:24:26 +0300
commitfd498bdfcfad7806c37674622e32244d659a16ea (patch)
tree89e82a4966dc99979683fa4fd39f7aa98cff6a30 /fbt
parentdbf1d9f33275c06c1d9dbe067fc42e79b681b087 (diff)
[FL-2554] Embedded arm-none-eabi toolchain (#1351)
Diffstat (limited to 'fbt')
-rwxr-xr-xfbt28
1 files changed, 16 insertions, 12 deletions
diff --git a/fbt b/fbt
index b3d2ca35..0ea572b1 100755
--- a/fbt
+++ b/fbt
@@ -1,18 +1,22 @@
-#!/bin/bash
+#!/bin/sh
-set -e
+# shellcheck disable=SC2086 source=/dev/null
+# unofficial strict mode
+set -eu;
-SCRIPTDIR="$( dirname -- "$0"; )";
-SCONS_EP=${SCRIPTDIR}/lib/scons/scripts/scons.py
+SCONS_DEFAULT_FLAGS="-Q --warn=target-not-built";
+SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd -P)";
-if [[ -z "${FBT_NO_SYNC:-}" ]] ; then
- if [[ -d .git ]]; then
- git submodule update --init
- else
- echo Not in a git repo, please clone with git clone --recursive
- exit 1
+if [ -z "${FBT_NOENV:-}" ]; then
+ . "$SCRIPT_PATH/scripts/toolchain/fbtenv.sh";
+fi
+
+if [ -z "${FBT_NO_SYNC:-}" ]; then
+ if [ ! -d "$SCRIPT_PATH/.git" ]; then
+ echo "\".git\" directory not found, please clone repo via \"git clone --recursive\"";
+ exit 1;
fi
+ git submodule update --init;
fi
-SCONS_DEFAULT_FLAGS="-Q --warn=target-not-built"
-python3 ${SCONS_EP} ${SCONS_DEFAULT_FLAGS} "$@"
+python3 "$SCRIPT_PATH/lib/scons/scripts/scons.py" $SCONS_DEFAULT_FLAGS "$@" \ No newline at end of file