Add install-dust

This commit is contained in:
Jeffrey Serio 2024-10-27 10:33:44 -05:00
parent eda1b5c9d0
commit f42330621d

View File

@ -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"