devtool: ide-sdk: use /bin/sh instead of /bin/bash

When generating the install and deploy script for IDEs, use /bin/sh
instead of /bin/bash. While this is not addressing a known issue,
using the more portable /bin/sh shell is preferable and avoids
requiring bash to be installed.

(From OE-Core rev: 7db8dd3631d3fcd112631761d8aa12886213273c)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Adrian Freihofer
2025-10-06 00:00:32 +02:00
committed by Richard Purdie
parent 12049eb12c
commit 4688d95518

View File

@@ -710,14 +710,15 @@ class RecipeModified:
def gen_install_deploy_script(self, args):
"""Generate a script which does install and deploy"""
cmd_lines = ['#!/bin/bash']
cmd_lines = ['#!/bin/sh']
# . oe-init-build-env $BUILDDIR
# Note: Sourcing scripts with arguments requires bash
# Using 'set' to pass the build directory to oe-init-build-env in sh syntax
cmd_lines.append('cd "%s" || { echo "cd %s failed"; exit 1; }' % (
self.oe_init_dir, self.oe_init_dir))
cmd_lines.append('. "%s" "%s" || { echo ". %s %s failed"; exit 1; }' % (
self.oe_init_build_env, self.topdir, self.oe_init_build_env, self.topdir))
cmd_lines.append('set ' + self.topdir)
cmd_lines.append('. "%s" || { echo ". %s %s failed"; exit 1; }' % (
self.oe_init_build_env, self.oe_init_build_env, self.topdir))
# bitbake -c install
cmd_lines.append(