only print success/fail when cli not already installed
This commit is contained in:
parent
fc1080a294
commit
56d956bf7e
11
cli.sh
11
cli.sh
@ -6,12 +6,17 @@ main(){
|
|||||||
|
|
||||||
_install_cli(){
|
_install_cli(){
|
||||||
local name=$1;
|
local name=$1;
|
||||||
bash ./warn.sh "Installing cli tool: $name" # v---- this skips already installed stuff
|
if $(! command -v "$name" &> /dev/null); then
|
||||||
if (sudo pacman -S --needed "$name" --noconfirm >>/dev/null); then
|
bash ./warn.sh "Installing cli tool: $name"
|
||||||
|
if (pacman -S --needed "$name" --noconfirm >>/dev/null); then
|
||||||
bash ./success.sh "Successfully installed cli tool: $name"
|
bash ./success.sh "Successfully installed cli tool: $name"
|
||||||
else
|
else
|
||||||
bash ./error.sh "Failed: $name"
|
bash ./error.sh "Failed: $name"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
bash ./warn.sh "Skipping: $name"
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run_cli_install(){
|
run_cli_install(){
|
||||||
@ -30,6 +35,8 @@ run_cli_install(){
|
|||||||
"nodejs" # <-- hawk tuah
|
"nodejs" # <-- hawk tuah
|
||||||
"npm" # <-- need unfortunately for work stuff
|
"npm" # <-- need unfortunately for work stuff
|
||||||
"zellij" # <-- multplexer
|
"zellij" # <-- multplexer
|
||||||
|
"lazygit"
|
||||||
|
"yazi-bin"
|
||||||
)
|
)
|
||||||
|
|
||||||
for i in "${cli_tools[@]}"; do
|
for i in "${cli_tools[@]}"; do
|
||||||
|
Loading…
Reference in New Issue
Block a user