diff options
author | Antonio Ospite <antonio.ospite@collabora.com> | 2019-03-08 17:38:43 +0100 |
---|---|---|
committer | Antonio Ospite <antonio.ospite@collabora.com> | 2019-03-17 21:08:08 +0100 |
commit | 8af2376bc0cf366019fc0212f2b441439ada1609 (patch) | |
tree | 9621234c08c808643009990d7d881a15730d43cc /gst-uninstalled.py | |
parent | 887da9a04b68ef240f59f4ce32fd102ae618e833 (diff) |
gst-uninstalled: make the bash prompt override optional
When using a custom prompt the automatic override may not look good, so
provide a mechanism to disable it.
Document that the user will have to use GST_ENV manually when setting
the prompt to have a visual indicator of the gst-uninstalled
environment.
Diffstat (limited to 'gst-uninstalled.py')
-rwxr-xr-x | gst-uninstalled.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gst-uninstalled.py b/gst-uninstalled.py index 01b40fe..1e5adab 100755 --- a/gst-uninstalled.py +++ b/gst-uninstalled.py @@ -14,6 +14,7 @@ import tempfile import pathlib from distutils.sysconfig import get_python_lib +from distutils.util import strtobool from common import get_meson from common import git @@ -229,7 +230,7 @@ if __name__ == "__main__": args += ['/k', 'prompt [gst-{}] $P$G'.format(gst_version)] else: args = [os.environ.get("SHELL", os.path.realpath("/bin/sh"))] - if "bash" in args[0]: + if "bash" in args[0] and not strtobool(os.environ.get("GST_BUILD_DISABLE_PS1_OVERRIDE", r"FALSE")): bashrc = os.path.expanduser('~/.bashrc') if os.path.exists(bashrc): tmprc = tempfile.NamedTemporaryFile(mode='w') |