[go: up one dir, main page]

Manifest,Scripts: use /bin/sh instead of /bin/bash to call rust build scripts

What

This MR updates Rust build scripts to use POSIX-compliant /bin/sh instead of /bin/bash, improving portability across different Unix-like systems.

Why

Using /bin/bash creates an unnecessary dependency on bash and reduces portability. On many systems, /bin/sh is not bash (e.g., it may be dash, ash, or another POSIX shell). By using POSIX-compliant shell syntax, the build scripts become more portable and will work correctly on a wider range of systems.

How

The MR makes three types of changes across multiple Rust build scripts:

Shebang updates: Changed from #!/usr/bin/env bash to #!/bin/sh in:

  • etherlink/lib_wasm_runtime/build.sh
  • src/rust_deps/build.sh
  • src/rustzcash_deps/build.sh

The system action in dune uses the system's default shell, which aligns with using #!/bin/sh in the scripts.

Manually testing the MR

Build the affected components on systems with different /bin/sh implementations (e.g., dash on Debian/Ubuntu, ash on Alpine, bash on other systems) to verify the scripts work correctly across platforms.

Edited by pietro

Merge request reports

Loading