update check-installed-tools
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user