summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRyan Eatmon <reatmon@ti.com>2024-09-10 15:17:24 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-09-12 16:15:09 +0100
commit40052a34c66a6b93fbfc57e2aa705f82bb250ad7 (patch)
tree9a0a0182792a109b22336326b4db4729e268cdc6 /scripts
parent313afc99ed773f39f77813d79c4fdeacbe15c315 (diff)
downloadpoky-40052a34c66a6b93fbfc57e2aa705f82bb250ad7.tar.gz
oe-setup-build: Change how we get the SHELL value
There are times that a user might not have SHELL set for some reason. We should default back to a known shell in the event that SHELL is not set. (From OE-Core rev: 9f3099b7eddccf2b7328c0fdd6423269d17138ce) Signed-off-by: Ryan Eatmon <reatmon@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/oe-setup-build4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/oe-setup-build b/scripts/oe-setup-build
index 1cb06b3b79..80d8c70bac 100755
--- a/scripts/oe-setup-build
+++ b/scripts/oe-setup-build
@@ -102,9 +102,9 @@ def setup_build_env(args):
102 102
103 cmd = "TEMPLATECONF={} {}".format(template["templatepath"], cmd_base) 103 cmd = "TEMPLATECONF={} {}".format(template["templatepath"], cmd_base)
104 if not no_shell: 104 if not no_shell:
105 cmd = cmd + " && {}".format(os.environ['SHELL']) 105 cmd = cmd + " && {}".format(os.environ.get('SHELL','bash'))
106 print("Running:", cmd) 106 print("Running:", cmd)
107 subprocess.run(cmd, shell=True, executable=os.environ['SHELL']) 107 subprocess.run(cmd, shell=True, executable=os.environ.get('SHELL','bash'))
108 108
109parser = argparse.ArgumentParser(description="A script that discovers available build configurations and sets up a build environment based on one of them. Run without arguments to choose one interactively.") 109parser = argparse.ArgumentParser(description="A script that discovers available build configurations and sets up a build environment based on one of them. Run without arguments to choose one interactively.")
110parser.add_argument("--layerlist", default=defaultlayers(), help='Where to look for available layers (as written out by setup-layers script) (default is {}).'.format(defaultlayers())) 110parser.add_argument("--layerlist", default=defaultlayers(), help='Where to look for available layers (as written out by setup-layers script) (default is {}).'.format(defaultlayers()))