1
0

update check-installed-tools

This commit is contained in:
2022-07-14 10:05:37 +02:00
parent b0f93c6b9d
commit 77160c7b20

View File

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