Add more tools

This commit is contained in:
David Tomaschik
2022-03-19 15:23:50 -07:00
parent 2217cfb47b
commit a49474fe60
3 changed files with 29 additions and 1 deletions

View File

@@ -401,6 +401,31 @@ EOF
blint)
pip3 install --user blint
;;
dust)
if ! command -v cargo >/dev/null 2>&1 ; then
echo "This needs cargo (for rust)!" >/dev/stderr
exit 1
fi
cargo install du-dust
;;
bottom)
if ! command -v cargo >/dev/null 2>&1 ; then
echo "This needs cargo (for rust)!" >/dev/stderr
exit 1
fi
cargo install bottom
;;
delta)
if !check_sudo ; then
echo "Must be able to run as sudo."
exit 1
fi
dpkg_url=$(curl https://api.github.com/repos/dandavison/delta/releases/latest | \
jq -r '.assets[] | select(.name|test(".*_amd64.deb")) | select(.name|test(".*musl.*")|not) | .browser_download_url')
dpkg_name="/tmp/delta_amd64.deb"
download "${dpkg_url}" "${dpkg_name}"
sudo dpkg -i "${dpkg_name}"
;;
*)
echo "Unknown tool: ${TOOL}" >/dev/stderr
list_tools

View File

@@ -1,3 +1,3 @@
function duf {
function duh {
du -sk "$@" | sort -n | while read size fname; do for unit in K M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done
}

View File

@@ -4,7 +4,10 @@ build-essential
cryptsetup
dsniff
ecryptfs-utils
exa
exuberant-ctags
fd-find
fzf
httpie
iftop
iptraf