diff options
Diffstat (limited to 'meta/classes/terminal.bbclass')
-rw-r--r-- | meta/classes/terminal.bbclass | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass index 6059ae95e0..2dfc7db255 100644 --- a/meta/classes/terminal.bbclass +++ b/meta/classes/terminal.bbclass | |||
@@ -1,3 +1,9 @@ | |||
1 | # | ||
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | |||
1 | OE_TERMINAL ?= 'auto' | 7 | OE_TERMINAL ?= 'auto' |
2 | OE_TERMINAL[type] = 'choice' | 8 | OE_TERMINAL[type] = 'choice' |
3 | OE_TERMINAL[choices] = 'auto none \ | 9 | OE_TERMINAL[choices] = 'auto none \ |
@@ -26,6 +32,9 @@ def emit_terminal_func(command, envdata, d): | |||
26 | bb.utils.mkdirhier(os.path.dirname(runfile)) | 32 | bb.utils.mkdirhier(os.path.dirname(runfile)) |
27 | 33 | ||
28 | with open(runfile, 'w') as script: | 34 | with open(runfile, 'w') as script: |
35 | # Override the shell shell_trap_code specifies. | ||
36 | # If our shell is bash, we might well face silent death. | ||
37 | script.write("#!/bin/bash\n") | ||
29 | script.write(bb.build.shell_trap_code()) | 38 | script.write(bb.build.shell_trap_code()) |
30 | bb.data.emit_func(cmd_func, script, envdata) | 39 | bb.data.emit_func(cmd_func, script, envdata) |
31 | script.write(cmd_func) | 40 | script.write(cmd_func) |
@@ -37,7 +46,7 @@ def emit_terminal_func(command, envdata, d): | |||
37 | def oe_terminal(command, title, d): | 46 | def oe_terminal(command, title, d): |
38 | import oe.data | 47 | import oe.data |
39 | import oe.terminal | 48 | import oe.terminal |
40 | 49 | ||
41 | envdata = bb.data.init() | 50 | envdata = bb.data.init() |
42 | 51 | ||
43 | for v in os.environ: | 52 | for v in os.environ: |