bootstrap.sh: Option for hiding the banner
Do not display the PIGWEED bannner if PW_ENVSETUP_NO_BANNER is set. This
allows projects to use their own banner, but keep the rest of the
bootstrap messaging.
Change-Id: I87c0720fb47faf026a999b04ed8a5e273f95a73b
diff --git a/bootstrap.sh b/bootstrap.sh
index dbb8059..348c642 100644
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -114,7 +114,7 @@
SETUP_SH="$PW_ROOT/pw_env_setup/.env_setup.sh"
-if [ -z "$PW_ENVSETUP_QUIET" ]; then
+if [ -z "$PW_ENVSETUP_QUIET" ] && [ -z "$PW_ENVSETUP_NO_BANNER" ]; then
_pw_green "\n WELCOME TO...\n"
_pw_bright_magenta "$_PIGWEED_BANNER\n"
fi
diff --git a/pw_cli/py/pw_cli/env.py b/pw_cli/py/pw_cli/env.py
index 16558d0..fe84779 100644
--- a/pw_cli/py/pw_cli/env.py
+++ b/pw_cli/py/pw_cli/env.py
@@ -28,6 +28,9 @@
parser.add_var('PW_EMOJI', type=envparse.strict_bool, default=False)
parser.add_var('PW_ENVSETUP')
parser.add_var('PW_ENVSETUP_FULL')
+ parser.add_var('PW_ENVSETUP_NO_BANNER',
+ type=envparse.strict_bool,
+ default=False)
parser.add_var('PW_ENVSETUP_QUIET',
type=envparse.strict_bool,
default=False)