From ef0b16879f246b9d005d033c6bc50afd2a0a72f1 Mon Sep 17 00:00:00 2001 From: Gilles Soulier Date: Sat, 16 May 2026 05:17:21 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20install.sh=20=E2=80=94=20URL=20fzf=20cor?= =?UTF-8?q?recte=20via=20GitHub=20API=20(nom=20inclut=20la=20version)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index c2d60cd..643f130 100755 --- a/install.sh +++ b/install.sh @@ -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