fix: install.sh — URL fzf correcte via GitHub API (nom inclut la version)

Le fichier s'appelle fzf-{version}-linux_amd64.tar.gz, pas fzf-linux_amd64.tar.gz.
On récupère d'abord le tag via l'API GitHub releases/latest.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-16 05:17:21 +02:00
parent 4272da744c
commit ef0b16879f
+7 -2
View File
@@ -63,9 +63,14 @@ trap cleanup EXIT
# ── Installation fzf ──────────────────────────────────────────────
_install_fzf_binary() {
local fzf_url="https://github.com/junegunn/fzf/releases/latest/download/fzf-linux_amd64.tar.gz"
local tmp_fzf="/tmp/fzf_$$.tar.gz"
info "Téléchargement fzf depuis GitHub Releases..."
info "Récupération de la version fzf depuis GitHub API..."
local fzf_ver
fzf_ver=$(curl -fsSL "https://api.github.com/repos/junegunn/fzf/releases/latest" \
| grep '"tag_name"' | head -1 | awk -F'"' '{print $4}')
[[ -z "$fzf_ver" ]] && { err "Impossible de déterminer la version fzf."; exit 1; }
local fzf_url="https://github.com/junegunn/fzf/releases/download/${fzf_ver}/fzf-${fzf_ver}-linux_amd64.tar.gz"
info "Téléchargement fzf ${fzf_ver}..."
curl -fsSL "$fzf_url" -o "$tmp_fzf"
mkdir -p "$HOME/.local/bin"
tar -xzf "$tmp_fzf" -C "$HOME/.local/bin/" fzf