zsh: add github binary fallbacks for bat/zoxide/delta (fixes RHEL/Alma without EPEL/cargo)
On RHEL-family distros without EPEL enabled and without cargo, the PM loop fails for bat/zoxide/git-delta and there was no fallback, so they ended up skipped/FAIL. Now, after the PM/cargo attempts fail, download the latest static release tarball from GitHub instead, matching the existing pattern for eza/fastfetch/starship/lazydocker. - Add _gh_latest_tag(): resolve latest release tag from the /releases/latest redirect (no GitHub API, no rate limits) - Add _gh_install_bin(): build the asset URL from a versioned template, download, extract, and cp the named binary into ~/.local/bin - Handle per-repo tag conventions: bat/zoxide tags are 'v0.x' while delta tags are bare '0.x'; keep the raw tag for the download path and strip the optional 'v' only for asset-filename substitution - Add target_musl/target_gnu per-arch (x86_64/aarch64/armv7l) - bat/zoxide use static musl builds (no glibc deps); delta ships gnu-only - Verbose 'gh installing <bin> (<tag> from <repo>)' / FAIL lines - Bump ZSHRC_BOOTSTRAP_VERSION 3 -> 4 so existing boxes re-run the bootstrap and pick up the new fallbacks Verified end-to-end: bat 0.26.1, zoxide 0.10.0, delta 0.19.2 all download, extract, install, and run from a temp HOME.
This commit is contained in:
+1
-1
@@ -112,7 +112,7 @@ All downloads use `--fail` so a 502/HTML error page is never written over a work
|
||||
| Variable | Default | Purpose |
|
||||
|----------|---------|---------|
|
||||
| `ZSHRC_GIT` | `.../scripts/raw/branch/master/zsh/` | Base URL for all remote config files |
|
||||
| `ZSHRC_BOOTSTRAP_VERSION` | `3` | Bump to force a re-bootstrap on all machines |
|
||||
| `ZSHRC_BOOTSTRAP_VERSION` | `4` | Bump to force a re-bootstrap on all machines |
|
||||
| `FFENABLED` | (unset → enabled) | Set to `false` to disable the fastfetch system info on shell start |
|
||||
| `BAT_THEME` | `Monokai Extended` | Override before the bat block to use a different bat theme |
|
||||
| `GIT_PAGER` | `delta` (when installed) | Override to use a different git pager |
|
||||
|
||||
Reference in New Issue
Block a user