Initialize the SolidGroundUX framework and load core modules
Source: target-root/usr/local/lib/solidgroundux/common/sgnd-bootstrap.sh
Initialize the SolidGroundUX framework and load core modules
Public functions
- Script init metadata
- Module init metadata
- On exit install
- Parse statespec
- Enable save state
- Disable save state
- Save state
- On exit add
- Check license
- Load ui style
- Bootstrap
Internal functions
| Function | Purpose | Arguments | Output |
|---|---|---|---|
_parse_bootstrap_args | Extract bootstrap-only options before the full argument parser is available. | $@ Raw script arguments passed to sgnd_bootstrap. | — |
_init_bootstrap | Prepare the minimum framework environment required before core libraries load. | — | — |
_source_corelibs | Load the fixed set of framework core libraries in bootstrap order. | — | — |
_source_usinglibs | Load script-declared framework libraries listed in SGND_USING. | — | — |
_sgnd_on_exit_run | Dispatch registered framework cleanup handlers when the shell exits. | — | — |
_sgnd_save_state_dispatch | Conditionally persist framework state from the exit-handler stack. | — | — |
_boot_fail | Report a bootstrap-stage failure without depending on later UI initialization. | — | — |
Description
Provides the central bootstrap mechanism for all SolidGroundUX scripts.
The library:
- Orchestrates framework initialization sequence
- Loads core and declared libraries (SGND_USING)
- Parses and separates framework and script arguments
- Initializes environment, configuration, and runtime state
- Applies standard execution flow for all scripts
- Ensures consistent startup behavior across all tools
Design principles
- Single entry point for framework initialization
- Deterministic and repeatable startup sequence
- Explicit dependency loading via SGND_USING
- Minimal assumptions about script context
Role in framework
- Central orchestrator of the SolidGroundUX runtime
- Bridges bootstrap environment, argument parsing, and module loading
- Ensures every script runs within a fully initialized framework context
Non-goals
- Business logic execution
- UI rendering or interaction handling
- Application-specific behavior
