From f42330621db94803a3e02c54de21ac6a914da1d0 Mon Sep 17 00:00:00 2001 From: Jeffrey Serio Date: Sun, 27 Oct 2024 10:33:44 -0500 Subject: [PATCH] Add install-dust --- just/.justfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/just/.justfile b/just/.justfile index a0d9837..eb89749 100644 --- a/just/.justfile +++ b/just/.justfile @@ -1,6 +1,5 @@ # justfile for common household tasks -set shell := ["zsh", "-cu"] dotfiles_repo := "/home/jas/repos/codeberg.org/hyperreal/dotfiles" homedir := "/home/jas/" configdir := "/home/jas/.config/" @@ -45,3 +44,14 @@ clean-dotfiles: rm -fv {{configdir}}/starship.toml rm -rfv {{configdir}}/zellij rm -rfv {{configdir}}/systemd + +install-dust: + #!/usr/bin/env bash + set -euo pipefail + dl_url=$(curl -s "https://api.github.com/repos/bootandy/dust/releases/latest" | jq '.assets.[].browser_download_url' | grep "x86_64-unknown-linux-gnu.tar.gz" | tr -d '"') + wget "$dl_url" + filename=$(basename -s .tar.gz dust*) + tar xvf "${filename}.tar.gz" + sudo cp -v "${filename}/dust" /usr/local/bin/ + sudo chown root:root /usr/local/bin/dust + rm -rf "$filename" "${filename}.tar.gz"