]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
devtool: ide-sdk: use /bin/sh instead of /bin/bash
authorAdrian Freihofer <adrian.freihofer@siemens.com>
Sun, 5 Oct 2025 22:00:32 +0000 (00:00 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 6 Oct 2025 22:15:57 +0000 (23:15 +0100)
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.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/devtool/ide_sdk.py

index 419222fa230516189df2bf5d3eebc593bbf1f63f..ccb6cfbc61b2815d72fe0f2d20459c864392b026 100755 (executable)
@@ -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(