sgnd_cfg_write_skeleton_filtered

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_cfg_write_skeleton_filtered

Purpose

Write an auto-generated cfg skeleton filtered by audience.

Behavior

  • Writes a commented KEY=VALUE config template.
  • Includes only specs matching the requested audience.
  • Includes specs marked "both" for either audience.
  • Uses current shell values as initial defaults where available.
  • Adds a standard auto-generated file header.

Arguments

  • $1 — FILE: Target cfg file path.
  • $2 — AUDIENCE: Filter (system or user).
  • $3 — SPEC_ARRAY_NAME: Name of the cfg specification array.
  • $4 — DOMAIN: Optional logical domain label (default: configuration).

Side effects

  • Creates or overwrites the target file.

Returns

  • 0 on success.
  • 1 on invalid arguments.

Usage

  sgnd_cfg_write_skeleton_filtered "$SGND_USRCFG_FILE" "user" SGND_FRAMEWORK_GLOBALS "Framework"

Examples

  sgnd_cfg_write_skeleton_filtered "$SGND_USRCFG_FILE" "user" SGND_FRAMEWORK_GLOBALS "Framework"

  sgnd_cfg_write_skeleton_filtered "$SGND_SYSCFG_FILE" "system" SGND_SCRIPT_GLOBALS "Script"