-
Notifications
You must be signed in to change notification settings - Fork 0
/
mac_software_install.sh
executable file
·53 lines (44 loc) · 1.86 KB
/
mac_software_install.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
46
47
48
49
50
51
52
53
#!/usr/bin/env bash
source colors.sh
echo "${cyan}Installing software for MacOS devices${reset}"
if ! [ -f /usr/local/etc/bash_completion ];
then
echo "${yellow}WARNING: Bash Completion is not installed.${reset}"
echo "Do you want to install it? (y/n): "
read install_completion
case $install_completion in
[Yy]* ) echo "${cyan}Installing bash completion.${reset}"; brew install bash-completion;;
* ) echo "Skipping bash completion installation."
esac
fi
if [ $(which brew; echo $?) -ne "0" ];
then
echo "${cyan}Installing Homebrew package manager${reset}"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
fi
if [ $(which tmux; echo $?) -ne "0" ];
then
echo "${cyan}Installing tmux${reset}"
brew install tmux
fi
if ! [ -f ~/.tmux/plugins/tpm/tpm ];
then
echo "${cyan}Installing TPM${reset}"
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
echo "${green}Installed TPM successfully. Please use prefix+I command to install plugins.${reset}"
fi
if [ $(brew list --versions nvm; echo $?) -ne "0" ]
then
echo "${cyan}Installing NVM${reset}"
brew install nvm
fi
if ! [ -d $HOME/.oh-my-zsh ];
then
echo "${cyan}Installing Oh My ZSH${reset}"
ZSH=$HOME/.oh-my-zsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)";
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting;
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
echo "${green}Installed Oh My ZSH successfully.${reset}"
fi
brew install fzf bat ripgrep