mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-21 13:02:25 +08:00
fix(scripts): replace hardcoded /bin/bash shebangs
Several helper scripts assumes bash is available at /bin/bash. That breaks on systems such as NixOS, where bash is resolved from PATH instead of a fixed /bin location and causes failures like `bad interpreter` during `make format`, e.g., on my host machine: ```sh $ make format /PX4-Autopilot/Tools/astyle/check_code_style.sh: /PX4-Autopilot/Tools/astyle/fix_code_style.sh: /bin/bash: bad interpreter: No such file or directory ``` This change switches these entrypoints to `#!/usr/bin/env bash` so they locate bash properly. No functional changes intended. Signed-off-by: Onur Özkan <work@onurozkan.dev>
This commit is contained in:
@@ -159,7 +159,7 @@ Runs after the package is installed. Common tasks:
|
||||
- Board-specific setup (e.g., DSP signature generation)
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# Create px4-* symlinks
|
||||
@@ -185,7 +185,7 @@ fi
|
||||
Runs before the package is removed:
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# Stop the service
|
||||
|
||||
Reference in New Issue
Block a user