-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.sh
62 lines (50 loc) · 1.58 KB
/
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
54
55
56
57
58
59
60
61
62
#!/usr/bin/env bash
if xcode-select -p &> /dev/null; then
echo "Xcode Command Line Utilities are already installed"
else
echo "Installing Xcode Command Line Utilities"
xcode-select --install
fi
if command -v brew &> /dev/null; then
echo "Homebrew is already installed"
else
echo "Installing Homebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> $HOME/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
# Make sure we're using the latest homebrew
brew update
# Upgrade any already-installed formulae
brew upgrade
# Remove outdated versions from the cellar
brew cleanup
# Save homebrew’s install location
BREW_PREFIX=$(brew --prefix)
brew install zsh
# Switch to using brew-installed zsh as default shell
if ! grep -F -q "${BREW_PREFIX}/bin/zsh" /etc/shells; then
echo "Configuring shell to use brew-installed zsh"
echo "${BREW_PREFIX}/bin/zsh" | sudo tee -a /etc/shells;
chsh -s "${BREW_PREFIX}/bin/zsh";
fi;
if [ -d $HOME/.oh-my-zsh ]; then
echo "Oh-My-Zsh is already installed"
else
echo "Installing Oh-My-Zsh"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
if command -v volta &> /dev/null; then
echo "Volta is already installed"
else
echo "Installing Volta"
/bin/bash -c "$(curl -fsSL https://get.volta.sh)"
fi
# Install starship theme
brew tap homebrew/cask-fonts
brew install --cask font-fira-code-nerd-font
brew install starship
# Command line tools
brew install bat
brew install eza
brew install zoxide