mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 09:32:13 +02:00
terminal.bbclass: use var-SHELL as the shebang of wrapper script
The devshell.bbclass set var-SHELL to var-DEVSHELL, and terminal.bbclass initial var-SHELL with `bash'. Keep sync with it, use var-SHELL rather than hardcoded `/bin/sh' as the shebang of wrapper script. On Ubuntu host, default shell is dash (/bin/sh -> dash), even though we assign var-SHELL with `/bin/bash', the wrapper script is still dashism. (From OE-Core rev: 27e2ede65f1193e49f9483b08a55495d88740a65) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
f3f4a5f29b
commit
b7fb4aee25
@@ -25,7 +25,8 @@ def emit_terminal_func(command, envdata, d):
|
||||
bb.utils.mkdirhier(os.path.dirname(runfile))
|
||||
|
||||
with open(runfile, 'w') as script:
|
||||
script.write('#!/bin/sh -e\n')
|
||||
script.write('#!/usr/bin/env %s\n' % d.getVar('SHELL'))
|
||||
script.write('set -e\n')
|
||||
bb.data.emit_func(cmd_func, script, envdata)
|
||||
script.write(cmd_func)
|
||||
script.write("\n")
|
||||
|
||||
Reference in New Issue
Block a user