1
0

check if commonly used tools are installed

This commit is contained in:
2022-07-13 21:54:00 +02:00
parent 81a0825e03
commit b0f93c6b9d

View File

@@ -0,0 +1,18 @@
#!/bin/bash
declare -A TOOLS
TOOLS+=( ["batcat"]=bat ["exa"]=exa ["fdfind"]=fd-find ["glow"]=glow ["readelf"]=binutils ["rg"]=ripgrep ["thefuck"]=thefuck )
declare -A PACKAGES
for tool in ${!TOOLS[@]}; do
if [[ ! -x "$(command -v $tool)" ]]; then
PACKAGES+=("${TOOLS[$tool]}")
fi
done
if [[ ${#PACKAGES[@]} > 0 ]]; then
echo sudo apt install $(printf " %s" "${!PACKAGES[@]}")
else
echo All needed tools already installed.
fi