#!/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 "$@"