From b367788b1fe9081b50a674710d6facf36a82167f Mon Sep 17 00:00:00 2001 From: Jeffrey Serio Date: Sun, 24 Nov 2024 07:11:59 -0600 Subject: [PATCH] Add install-fzf --- justfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/justfile b/justfile index 3d858ea..9638993 100644 --- a/justfile +++ b/justfile @@ -89,3 +89,14 @@ install-dust: sudo cp -v "${filename}/dust" /usr/local/bin/ sudo chown root:root /usr/local/bin/dust rm -rf "$filename" "${filename}.tar.gz" + +install-fzf: + #!/usr/bin/env bash + set -euo pipefail + curl -s https://api.github.com/repos/junegunn/fzf/releases/latest | grep "browser_download_url" | grep "linux_$(dpkg --print-architecture)" | cut -d : -f 2,3 | tr -d '"' | wget -qi - + curl -s https://api.github.com/repos/junegunn/fzf/releases/latest | grep "browser_download_url" | grep "checksums.txt" | cut -d : -f 2,3 | tr -d '"' | wget -qi - + if [ $(grep "linux_$(dpkg --print-architecture)" *checksums.txt | sha256sum -c | awk '{print $2}') = "OK" ]; then + tar xvf fzf*.tar.gz + sudo mv fzf /usr/bin/fzf + fi + rm -v fzf*.txt fzf*.tar.gz