-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-osx.sh
executable file
·105 lines (91 loc) · 2.38 KB
/
install-osx.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/bin/bash
# Install Xcode Command Line Tools.
echo "Installing XCode Command Line Tools..."
xcode-select --install
echo "...done!"
# Install terminfo for wezterm.
echo "Creating terminfo for Wezterm..."
tempfile=$(mktemp) &&
curl -o "$tempfile" https://raw.githubusercontent.com/wez/wezterm/main/termwiz/data/wezterm.terminfo &&
tic -x -o "$HOME/.terminfo" "$tempfile" &&
rm "$tempfile"
echo "...done!"
bash <"create-symlinks.sh"
# Install Homebrew.
echo "Installing Homebrew..."
export HOMEBREW_NO_ENV_HINTS=1
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Source Homebrew shell configuration.
eval "$(/opt/homebrew/bin/brew shellenv)"
echo "...done!"
# Add formulae taps.
echo "Updating system and installing base packages..."
brew tap jesseduffield/lazygit
brew tap oven-sh/bun
brew tap wez/wezterm-linuxbrew
# Update Homebrew.
brew update && brew upgrade
ulimit -n 3072
# Install a bunch of stuff.
brew install \
azure-cli \
bat \
bun \
cmake \
direnv \
dotnet \
eza \
fastfetch \
fd \
fzf \
gcc \
gh \
git-delta \
golang \
lazygit \
lua \
luajit \
luarocks \
fastfetch \
powerlevel10k \
python \
ripgrep \
rustup \
thefuck \
tlrc \
volta \
wezterm \
zoxide \
zsh-vi-mode \
zsh
echo "...done!"
# Install fzf-git key bindings.
echo "Installing fzf-git key bindings..."
git clone https://github.com/junegunn/fzf-git.sh.git "$HOME/.fzf-git"
echo "...done!"
# Install node and pnpm.
echo "Installing node..."
volta install node@latest
# Add node to PATH so it can be used by neovim plugins during sync.
PATH="$HOME/.volta/bin:$PATH"
echo "...done!"
# Install neovim nightly.
echo "Installing neovim nightly..."
brew install neovim --HEAD || {
# If status code not zero then install neovim nightly from source.
echo "Failed to install neovim nightly from brew. Installing from source..."
git clone https://github.com/neovim/neovim /neovim && (cd /neovim || exit)
make distclean
make CMAKE_BUILD_TYPE=Release
sudo make install
}
echo "...done!"
echo "Installing Neovim plugins..."
nvim --headless "+Lazy! sync" "+sleep 5" +MasonUpdate "+sleep 5" +TSUpdateSync "+sleep 5" +qa
echo "...done!"
echo "Authorizing ZSH and setting default shell..."
sudo sh -c "echo $(which zsh) >> /etc/shells"
sudo chsh -s "$(which zsh)" "$USER"
echo "...done!"
echo "All done! Please restart your shell to apply changes."