Canonical Structure Normalizer

SolidGroundUX DocumentationSolidGroundUX
NL

Replace canonical bootstrap and library-guard structures in shell files.

Source: target-root/usr/local/libexec/solidgroundux/normalize-canon.sh

Replace canonical bootstrap and library-guard structures in shell files.

Public functions

Internal functions
FunctionPurposeArgumentsOutput
_collect_cli_inputsPreserve positional file and mask arguments as explicit runtime inputs while- $@ — Original executable arguments.—
_get_parametersResolve the file or mask used for canonical normalization, using explicit——
_resolve_canon_filesResolve and validate canonical fragment files.——
_detect_canonical_targetDetermine which canonical structure a file contains.- $1 — FILE—
_replace_framework_locatorReplace one locator function and its canonical header.- $1 — FILE—
_replace_library_guardReplace the complete Library guard section.- $1 — FILE—
_expand_inputExpand one file path or glob mask.- $1 — INPUTWrites matching regular files, one per line.
_normalize_fileApply the appropriate canonical replacement to one file.- $1 — FILE—

Description

Applies canonical SolidGroundUX structural fragments to one or more shell files. Files are classified from their contents: _framework_locator() identifies an executable bootstrap target, while _sgnd_lib_guard() identifies a source-only library or console module. Files containing neither target are skipped; files containing both are rejected.

Usage

Run the executable from its shell command (or installed wrapper):

normalize-canon /path/to/file.sh
normalize-canon '/path/to/project/**/*.sh'
normalize-canon '/path/to/project/usr/local/lib/**/*.sh'

Script-specific options:

  • --auto, -a: Run using command-line inputs or saved parameters.