Skip to content

install.sh and two repository tools carry copies of Declare-BashScript's functions and trap through its on_error_or_interrupt #1037

Closed

Description

@David-Noble-at-work

Ruled 2026-10-08. The owner's acceptance for the helper's trap handler, NobleFactor/noblefactor-ops#268: "We will accept the trap logic when all bash scripts in base, team, and main that have trap logic using the Declarre-BashScript trap logic." Of this repository's installer: "We have a DevLore-cli install.sh script that could embed Declare-BashScript but should not source it." Offered taking now the five bash files that trap without the helper, the installers and this repository's two tools embedding it: "All five now".

Three of the five are here (surveyed 2026-10-08, here-documents excluded):

File Trap today
install.sh trap cleanup EXIT, line 77
packaging/macports/generate-portfile.sh trap 'rm -f "$TMPFILE"' EXIT, line 26
scripts/Test-InstallScript.sh trap 'rm -rf "$scratch"' EXIT, line 67

install.sh runs as curl ... | bash on a machine with nothing deployed, so no helper stands beside it. The two tools run in this public repository, where an outside contributor has no base layer (#484). Each carries copies of the helper's functions rather than sourcing it: ruled 2026-10-10, nothing embeds the whole helper, and the copies are made by hand from the helper as it is today.

Ruled 2026-10-09: install.sh's part

Told that the helper parses options with GNU getopt, which a fresh Mac lacks, so install.sh could share its parsing only through an argument parser of our own, the owner: "I do not want to maintain an argument parser without a drop-dead good reason and I'm not sure that macOS is a good enough reason." Then: "The update to install.sh will be two things: updated narration methods that match Declare-BashScript; updated arg processing to allow space or equal." The second is #1038. Asked whether install.sh's trap, and the two tools, still move onto the helper's handler: "Add the helper's handler to the list of changes."

Done when

  • each of the three carries copies of Declare-BashScript's functions, made by hand from the helper as it is today (ruled 2026-10-10), and traps through its handler, stating its own cleanup
  • how an embedded copy is kept identical to the base's is settled in the plan, and holds: by hand, as needed, ruled 2026-10-09 ("the helper functions we need can be updated manually as needed")
  • scripts/Test-InstallScript.sh passes against the changed install.sh
  • install.sh takes each of its options as --option value as well as --option=value (install.sh takes its options only as --option=value: --prefix ~/x is refused as an unknown argument #1038, ruled 2026-10-09: "1")
  • install.sh's narration functions match the helper's (ruled 2026-10-09)

Waits on NobleFactor/noblefactor-ops#268. The other two of the five go with it: the base's scripts/setup-ground-zero.sh in NobleFactor/noblefactor-ops#268, and personal's Install-NFBuildTools in David-Noble-at-work/personal#266.

Plan and design documents

Kind Document
Plan docs/plans/chore/1037-install-sh-embeds-declare.md
Design docs/architecture/10-command-line-interface.md, § 2, The installers

Epic: NobleFactor/noblefactor-ops#142 · Feature: NobleFactor/noblefactor-ops#266

Activity

  1. added
    choreMaintenance work on the repo: build, CI, tooling, process
    Epic:Ops:ProcessTooling axis: process work; never closes
    on Oct 8, 2026
  2. changed the title [-]install.sh and two repository tools embed Declare-BashScript and trap through its on_error_or_interrupt[/-] [+]install.sh and two repository tools carry copies of Declare-BashScript's functions and trap through its on_error_or_interrupt[/+] on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Epic:Ops:ProcessTooling axis: process work; never closeschoreMaintenance work on the repo: build, CI, tooling, process

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions