ArchSetupScripts/cli.sh

55 lines
1.1 KiB
Bash
Raw Normal View History

2024-11-10 13:58:16 +00:00
#!/bin/bash
main(){
2024-11-11 16:02:53 +00:00
if [[ "$(whoami)" != "root" ]];then
bash ./error.sh "Must be root (current: $USER)";
exit 1;
fi
run_cli_install;
2024-11-10 13:58:16 +00:00
}
_install_cli(){
local name=$1;
if $(! command -v "$name" &> /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"
else
bash ./error.sh "Failed: $name"
fi
else
bash ./warn.sh "Skipping: $name"
fi
2024-11-10 13:58:16 +00:00
}
run_cli_install(){
echo "########################### Cli Tools #######################"
local cli_tools=(
"git"
2024-11-11 03:06:00 +00:00
"vim" # <-- second to helix
"helix" # <-- my fave editor
2024-11-10 13:58:16 +00:00
"typescript"
"typescript-language-server"
"bash-language-server"
"mingw-w64-x86_64-clang" # <-- expect failure
2024-11-11 03:06:00 +00:00
"flatpak" # <-- good ol flatty, baby
2024-11-10 13:58:16 +00:00
"fish" # <-- shell
2024-11-10 17:29:14 +00:00
"less"
2024-11-11 03:06:00 +00:00
"nodejs" # <-- hawk tuah
"npm" # <-- need unfortunately for work stuff
2024-11-11 07:44:13 +00:00
"tmux" # <-- multplexer
"lazygit"
2024-11-11 07:44:13 +00:00
"yazi"
"wezterm"
"ttf-nerd-fonts-symbols-mono"
2024-11-10 13:58:16 +00:00
)
for i in "${cli_tools[@]}"; do
_install_cli "$i";
done;
}
main;