GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — script-utils/installer/README.md at master · descoped/script-utils

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
102 lines (71 loc) · 4.08 KB
/

README.md

Copy path

File metadata and controls

102 lines (71 loc) · 4.08 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Install Script Utility

A bootstrap script that downloads and installs modules from this repository based on a per-module install.yml manifest. Designed to be invoked directly via curl | bash.

Installation

curl -sSL https://raw.githubusercontent.com/descoped/script-utils/master/installer/install.sh | bash -s -- <module_name>

Pipe to bash, not sh. The script uses Bash 4 features ([[, BASH_REMATCH, local) that dash/ash silently miscompile.

Configuration file grammar

The installer downloads <module_name>/install.yml and parses it with a hand-rolled line-based Bash regex. This means the accepted grammar is intentionally small and flat. Do not extend it without switching to a real YAML parser (yq, python -c 'import yaml').

Accepted syntax — each file entry is a - file: line followed by zero or more indented keys:

- file: <path>              # required; path relative to the module dir
  executable: true          # optional; chmod +x after download
  create-symlink: true      # optional; create a symlink next to the target,
                            # stripping the extension (.sh, .py, ...)
  destination: <subdir>     # optional; install under $INSTALL_DIR/.<module>/<subdir>/
                            # instead of at $INSTALL_DIR root

Lines starting with # and blank lines are ignored. Anything else is silently skipped — keep the manifest lean.

Example — see example-install.yml.

Integrity verification (required)

Every installable module must ship a checksums.txt alongside install.yml:

<sha256>  install.yml
<sha256>  <file1>
<sha256>  <file2>

Format is standard sha256sum output (hash, two spaces, filename). The installer:

  1. Downloads checksums.txt first.
  2. Downloads and verifies install.yml against it (the manifest drives the install, so it must be verified before parsing).
  3. For each listed file, downloads and verifies against the matching entry.

Any missing entry or mismatched hash aborts the install before any chmod +x runs. This closes the supply-chain gap flagged by REQUIREMENTS §3.

To regenerate after editing a module's files:

cd <module>/
shasum -a 256 *.sh *.py README.md install.yml > checksums.txt

Environment variables

Variable Purpose
INSTALL_DIR Installation directory. Default $HOME/bin. Skips the interactive prompt when set.
CONFIRM Set to 1 or yes to skip the "Proceed with installation?" prompt. Required when /dev/tty is unavailable.
SCRIPT_UTILS_REF Git ref to fetch from. Default master. Set to a commit SHA (or branch name) for a reproducible install. This repo does not cut tagged releases — master is the normal case.
SCRIPT_UTILS_OWNER GitHub owner. Default descoped. Override for forks.
SCRIPT_UTILS_REPO GitHub repo. Default script-utils. Override for forks.
ALLOW_UNVERIFIED Set to 1 to proceed when checksums.txt is missing. Insecure — use only as a short-term escape hatch. The installer prints a loud warning and emits an "UNVERIFIED" completion message.

Examples

Install to a custom directory:

curl -sSL https://raw.githubusercontent.com/descoped/script-utils/master/installer/install.sh \
  | INSTALL_DIR=/opt/script-utils bash -s -- append-files

Pin to a specific commit (e.g. for an airgapped rebuild or a known-good state):

SHA=<40-char-sha>
curl -sSL "https://raw.githubusercontent.com/descoped/script-utils/$SHA/installer/install.sh" \
  | SCRIPT_UTILS_REF="$SHA" bash -s -- append-files

Non-interactive install (CI):

curl -sSL https://raw.githubusercontent.com/descoped/script-utils/master/installer/install.sh \
  | INSTALL_DIR=$HOME/bin CONFIRM=1 bash -s -- append-files

Log levels

  • INFO (green) — normal progress
  • WARN (yellow) — non-fatal issues, including the ALLOW_UNVERIFIED=1 bypass
  • ERROR (red, stderr) — fatal
  • DEBUG (blue) — currently unused

Exit codes

  • 0 — success, or user-declined install
  • 1 — download, verification, or parse failure
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.