check if commonly used tools are installed
This commit is contained in:
18
.config/yadm/bootstrap.d/check-installed-tools
Executable file
18
.config/yadm/bootstrap.d/check-installed-tools
Executable 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
|
||||||
Reference in New Issue
Block a user