Skip to content

feat(install): add command that installs and pins deps in .bashdep - #68

Merged
Chemaclass merged 1 commit into
mainfrom
feat/add-command
Sep 25, 2026
Merged

Chemaclass merged 1 commit into
mainfrom
feat/add-command

Conversation

@Chemaclass

Copy link
Copy Markdown
Owner

Why

Checksums are opt-in, and pinning one by hand means download, shasum, copy, paste. Most people skip it.

What

bashdep add <url...> installs the URL and appends it to .bashdep with #sha256= from the downloaded file.

./lib/bashdep add https://github.com/Chemaclass/bash-dumper/releases/download/0.1/dumper.sh@dev
# .bashdep gains: .../dumper.sh@dev#sha256=1bcf30...
  • Creates .bashdep when missing. Respects --file.
  • Keeps the @dev suffix before the checksum.
  • URL already listed: installs it, does not append again.
  • Explicit #sha256=: verified and kept as given.
  • Failed download: nothing written. Exit code is the failure count.
  • Honors dry-run, silent, verbose, force. In --help and completions.

The pin is trust on first use. Documented in behavior.md.

Test plan

  • 15 new tests (file write, dev suffix, dedup, dry-run, failures, CLI, completion)
  • Manual run against a real release URL on bash 3.2
  • make check green

@Chemaclass
Chemaclass merged commit 9cd225e into main Sep 25, 2026
6 checks passed
@Chemaclass
Chemaclass deleted the feat/add-command branch September 25, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant