mirror of
https://github.com/johndoe6345789/SparkOS.git
synced 2026-04-24 13:34:56 +00:00
Add clarifying comments about bash usage in build scripts
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
@@ -39,8 +39,8 @@ SparkOS aims to be:
|
|||||||
- Comment complex logic
|
- Comment complex logic
|
||||||
|
|
||||||
- **Shell Scripts**: Follow Google Shell Style Guide
|
- **Shell Scripts**: Follow Google Shell Style Guide
|
||||||
- Use `#!/bin/sh` for POSIX-compliant scripts (preferred for busybox compatibility)
|
- For runtime scripts (inside rootfs): Use `#!/bin/sh` for POSIX-compliant scripts (busybox compatibility)
|
||||||
- Use `#!/bin/bash` only when bash-specific features are required
|
- For build scripts (host system): Can use `#!/bin/bash` when bash-specific features are needed
|
||||||
- Quote variables
|
- Quote variables
|
||||||
- Use meaningful variable names
|
- Use meaningful variable names
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Quick build script for SparkOS development
|
# 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
|
set -e
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# SparkOS Image Creation Script
|
# SparkOS Image Creation Script
|
||||||
# Creates a bootable dd-able disk image
|
# 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
|
set -e
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# SparkOS Setup Script
|
# SparkOS Setup Script
|
||||||
# Sets up a minimal rootfs with busybox and essential utilities
|
# 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
|
set -e
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user