mirror of
https://github.com/toyota-connected/emb_cli.git
synced 2026-06-21 07:19:37 -07:00
1af62109e4
--shellenv emits an eval-able export of the Dart SDK bin and the emb shim dir, so eval "$(./bootstrap.sh --shellenv)" fetches Dart, activates emb, and puts both on PATH in one line. The default clean-stdout bin-dir output is unchanged. Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
14 lines
620 B
Bash
Executable File
14 lines
620 B
Bash
Executable File
#!/usr/bin/env sh
|
|
# Fetch a cached Dart SDK and install `emb` from this checkout (Linux/macOS).
|
|
# All flags pass through, e.g. `./bootstrap.sh --version 3.10.1`.
|
|
#
|
|
# Bare run prints the SDK bin dir on stdout — capture it to put Dart on PATH:
|
|
# DART_BIN=$(./bootstrap.sh) && export PATH="$DART_BIN:$PATH"
|
|
# Or emit an eval-able export of both Dart + the emb shim dir in one step:
|
|
# eval "$(./bootstrap.sh --shellenv)"
|
|
#
|
|
# Windows: run `python tool\bootstrap_dart.py --activate .` instead.
|
|
set -eu
|
|
root=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
exec python3 "$root/tool/bootstrap_dart.py" --activate "$root" "$@"
|