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:
+7
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user