Add clarifying comments about bash usage in build scripts

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-28 15:18:19 +00:00
parent 6b978f05e0
commit 57a4e92511
4 changed files with 8 additions and 2 deletions

View File

@@ -39,8 +39,8 @@ SparkOS aims to be:
- Comment complex logic
- **Shell Scripts**: Follow Google Shell Style Guide
- Use `#!/bin/sh` for POSIX-compliant scripts (preferred for busybox compatibility)
- Use `#!/bin/bash` only when bash-specific features are required
- For runtime scripts (inside rootfs): Use `#!/bin/sh` for POSIX-compliant scripts (busybox compatibility)
- For build scripts (host system): Can use `#!/bin/bash` when bash-specific features are needed
- Quote variables
- Use meaningful variable names

View File

@@ -1,5 +1,7 @@
#!/bin/bash
# Quick build script for SparkOS development
# Note: This script runs on the host system and uses bash for ${BASH_SOURCE}
# The target system uses busybox sh instead.
set -e

View File

@@ -1,6 +1,8 @@
#!/bin/bash
# SparkOS Image Creation Script
# Creates a bootable dd-able disk image
# Note: This script runs on the host system and uses bash for ${BASH_SOURCE}
# The target system uses busybox sh instead.
set -e

View File

@@ -1,6 +1,8 @@
#!/bin/bash
# SparkOS Setup Script
# Sets up a minimal rootfs with busybox and essential utilities
# Note: This script runs on the host system and uses bash for ${BASH_SOURCE}
# The target system uses busybox sh instead.
set -e