-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_once_install_apps.sh
46 lines (38 loc) · 1010 Bytes
/
run_once_install_apps.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
install_on_fedora() {
sudo dnf install -y ansible
}
install_on_ubuntu() {
sudo apt-get update
sudo apt-get install -y ansible zsh git starship
}
install_on_arch() {
sudo pacman -Syu --noconfirm ansible zsh git starship neovim openssh bat exa fzf github-cli neofetch zoxide ripgrep fd wget man-db tmux chezmoi
}
install_on_mac() {
brew install ansible zsh git starship
}
OS="$(uname -s)"
case "${OS}" in
Linux*)
if [ -f /etc/fedora-release ]; then
install_on_fedora
elif [ -f /etc/lsb-release ]; then
install_on_ubuntu
elif [ -f /etc/arch-release ]; then
install_on_arch
else
echo "Unsupported Linux distribution"
exit 1
fi
;;
Darwin*)
install_on_mac
;;
*)
echo "Unsupported operating system: ${OS}"
exit 1
;;
esac
ansible-playbook ~/.bootstrap/setup.yml --ask-become-pass
echo "Ansible installation complete."