-
-
Notifications
You must be signed in to change notification settings - Fork 97
/
dbt
executable file
·36 lines (29 loc) · 1012 Bytes
/
dbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
# Deluge Build Tool (DBT)
#
# Build script for DelugeFirmware, blatantly borrowed from 'fbt' used by
# flipperdevices/flipperzero-firmware and licensed under GNU GPL
# shellcheck disable=SC2086 source=/dev/null
# unofficial strict mode
set -eu;
# private variables
N_GIT_THREADS="$(getconf _NPROCESSORS_ONLN)";
SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd -P)";
DBT_EP="python3 dbt.py";
# public variables
DBT_NOENV="${DBT_NOENV:-""}";
DBT_NO_SYNC="${DBT_NO_SYNC:-""}";
DBT_TOOLCHAIN_PATH="${DBT_TOOLCHAIN_PATH:-$SCRIPT_PATH}";
DBT_VERBOSE="${DBT_VERBOSE:-""}";
DBT_NO_PYTHON_UPGRADE="${DBT_NO_PYTHON_UPGRADE:-""}";
if [ -z "$DBT_NOENV" ]; then
DBT_VERBOSE="$DBT_VERBOSE" . "$SCRIPT_PATH/scripts/toolchain/dbtenv.sh";
fi
if [ -z "$DBT_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 --jobs "$N_GIT_THREADS";
fi
$DBT_EP "$@"