-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrew.sh
executable file
·104 lines (94 loc) · 2.54 KB
/
brew.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
#!/usr/bin/env bash
if test ! "$(command -v brew)"; then
echo "Installing homebrew"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
echo -e "\\n\\nInstalling homebrew packages..."
echo "=============================="
formulas=(
bat
ccat
diff-so-fancy
dnsmasq
fzf
fd
git
grep
highlight
hub
markdown
mas
reattach-to-user-namespace
the_silver_searcher
shellcheck
tmux
tmuxinator
trash
tree
wget
curl
z
zsh
ripgrep
git-standup
entr
universal-ctags
gpg
gawk
redis
"jesseduffield/lazygit/lazygit"
btop
overmind
# Postgres dependencies - https://github.com/smashedtoatoms/asdf-postgres?tab=readme-ov-file#mac
zlib
ossp-uuid
icu4c
pkg-config
act # Run github actions locally
orbstack # Lighter, smaller and faster docker
gnu-sed # sed
)
for formula in "${formulas[@]}"; do
formula_name=$(echo "$formula" | awk '{print $1}')
if brew list "$formula_name" >/dev/null 2>&1; then
echo "$formula_name already installed... skipping."
else
brew install "$formula"
# arch_name="$(uname -m)"
# if [ "${arch_name}" = "x86_64" ]; then
# if [ "$(sysctl -in sysctl.proc_translated)" = "1" ]; then
# echo "Running on Rosetta 2"
# arch -x86_64 brew install "$formula"
# else
# echo "Running on native Intel"
# brew install "$formula"
# fi
# elif [ "${arch_name}" = "arm64" ]; then
# echo "Running on ARM"
# arch -arm64 brew install "$formula"
# else
# echo "Unknown architecture: ${arch_name}"
# fi
fi
done
# After the install, setup fzf
echo -e "\\n\\nRunning fzf install script..."
echo "=============================="
/usr/local/opt/fzf/install --all --no-bash --no-fish
# after the install, install neovim python libraries
# echo -e "\\n\\nRunning Neovim Python install"
# echo "=============================="
# pip3 install pynvim
# Change the default shell to zsh
zsh_path="$(command -v zsh)"
if ! grep "$zsh_path" /etc/shells; then
echo "adding $zsh_path to /etc/shells"
echo "$zsh_path" | sudo tee -a /etc/shells
fi
if [[ "$SHELL" != "$zsh_path" ]]; then
chsh -s "$zsh_path"
echo "default shell changed to $zsh_path"
# Source zshrc
echo "source $DOTFILES/zsh/zshenv.symlink" >>~/.zshrc
echo "source $DOTFILES/zsh/zshrc.symlink" >>~/.zshrc
fi