Skip to content

Commit 2082401

Browse files
committed
updated brew installs
1 parent 3df808d commit 2082401

3 files changed

Lines changed: 123 additions & 54 deletions

File tree

.zshrc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
zmodload zsh/zprof
2-
31
# Start configuration added by Zim install {{{
42
#
53
# User configuration sourced by interactive shells
@@ -265,11 +263,6 @@ source $ZSH/oh-my-zsh.sh
265263
# alias zshconfig="mate ~/.zshrc"
266264
# alias ohmyzsh="mate ~/.oh-my-zsh"
267265

268-
# install homebrew
269-
if [[ $(command -v brew) == "" ]]; then
270-
echo "Installing Hombrew"
271-
bash $HOME/scripts/bash/dotfiles/install_brew
272-
fi
273266

274267

275268
# install additional dependencies
@@ -444,3 +437,8 @@ alias l.="ls -A | egrep '^\.'"
444437

445438

446439
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
440+
441+
442+
export PATH=/opt/homebrew/bin:$PATH
443+
444+
alias uninstall_brew="NONINTERACTIVE=1 /bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)\""

scripts/bash/dotfiles/install_brew

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,72 @@
11
#!/usr/bin/env bash
22
if ! command -v brew &> /dev/null
33
then
4-
echo Installing brew...
5-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
4+
5+
if [[ $(arch) == 'arm64' ]]
6+
then
7+
echo Installing Xcode Command Line Utilites...
8+
xcode-select --install
9+
echo Installing brew...
10+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
11+
brew update
12+
brew upgrade
13+
14+
apps=(
15+
ag
16+
cmake
17+
coreutils
18+
dockutil
19+
ffmpeg
20+
fasd
21+
gifsicle
22+
git
23+
gnu-sed
24+
grep
25+
hub
26+
httpie
27+
imagemagick
28+
jq
29+
mackup
30+
peco
31+
psgrep
32+
python
33+
shellcheck
34+
ssh-copy-id
35+
svn
36+
tmux
37+
tree
38+
neovim
39+
volta
40+
wget
41+
nvm
42+
go
43+
cowsay
44+
zoxide
45+
python
46+
tmux
47+
htop
48+
fzf
49+
neovim
50+
)
51+
52+
53+
brew install "${apps[@]}"
54+
55+
python3 -m pip install --user --upgrade pynvim
56+
57+
# To install useful key bindings and fuzzy completion:
58+
$(brew --prefix)/opt/fzf/install
59+
60+
# Git comes with diff-highlight, but isn't in the PATH
61+
ln -sf "$(brew --prefix)/share/git-core/contrib/diff-highlight/diff-highlight" /usr/local/bin/diff-highlight
62+
63+
echo Adding to zprofile...
64+
grep -qxF 'eval "$(/opt/homebrew/bin/brew shellenv)" &> /dev/null' ~/.zprofile &> /dev/null || echo 'eval "$(/opt/homebrew/bin/brew shellenv)" &> /dev/null' >> ~/.zprofile
65+
# echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc
66+
eval "$(/opt/homebrew/bin/brew shellenv)"
67+
# TODO: add logic for adding non-mac ~/.zprofile
68+
69+
fi
670
else
771
echo Brew already installed. Updating...
872
brew update

scripts/bash/dotfiles/setup_dependencies

Lines changed: 52 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,58 +5,43 @@
55
#
66
# setup_dependencies
77

8+
# install homebrew
9+
if [[ $(command -v brew) == "" ]]; then
10+
echo "Installing Hombrew..."
11+
bash $HOME/scripts/bash/dotfiles/install_brew
12+
fi
13+
814
# permanently turn off analytics tracking
915
brew analytics off
1016

11-
# cowsay
12-
if ! command -v cowsay &> /dev/null
13-
then
14-
brew install cowsay
15-
fi
17+
# # cowsay
18+
# if ! command -v cowsay &> /dev/null
19+
# then
20+
# brew install cowsay
21+
# fi
1622

17-
# zoxide
18-
if ! command -v zoxide &> /dev/null
19-
then
20-
brew install zoxide
21-
fi
23+
# # zoxide
24+
# if ! command -v zoxide &> /dev/null
25+
# then
26+
# brew install zoxide
27+
# fi
2228

23-
# neovim
24-
if ! command -v nvim &> /dev/null
25-
then
26-
brew install neovim
27-
fi
2829

29-
# check if `vim-plug` is installed
30-
# this could be maintained with dotfiles, but better to get a current `plug.vim` file
31-
if [ ! -f "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim ]; then
32-
echo "Installing vim-plug for Neovim..."
33-
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
34-
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
35-
echo "vim-plug for Neovim installed."
36-
fi
30+
# # if ! command -v node &> /dev/null
31+
# # then
3732

38-
# install vim/neovim plugins
39-
if [ ! -d "$HOME/.vim/plugged" ]; then
40-
echo Installing plugins...
41-
nvim +'PlugInstall --sync' +qa
42-
echo Plugins installed.
43-
fi
33+
# # fi
4434

45-
# if ! command -v node &> /dev/null
35+
# if ! command -v python3 &> /dev/null
4636
# then
47-
37+
# brew install python
38+
# python3 -m pip install --user --upgrade pynvim
4839
# fi
4940

50-
if ! command -v python3 &> /dev/null
51-
then
52-
brew install python
53-
python3 -m pip install --user --upgrade pynvim
54-
fi
55-
56-
if ! command -v tmux &> /dev/null
57-
then
58-
brew install tmux
59-
fi
41+
# if ! command -v tmux &> /dev/null
42+
# then
43+
# brew install tmux
44+
# fi
6045

6146
# install tpm (tmux plugin manager)
6247
if [ ! -d "$HOME/.tmux/plugins/tpm/" ]; then
@@ -65,10 +50,10 @@ if [ ! -d "$HOME/.tmux/plugins/tpm/" ]; then
6550
echo tpm installed.
6651
fi
6752

68-
if ! command -v htop &> /dev/null
69-
then
70-
brew install htop
71-
fi
53+
# if ! command -v htop &> /dev/null
54+
# then
55+
# brew install htop
56+
# fi
7257

7358
if ! command -v rustup &> /dev/null
7459
then
@@ -85,3 +70,25 @@ fi
8570
if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-nvm" ]; then
8671
git clone https://github.com/lukechilds/zsh-nvm ~/.oh-my-zsh/custom/plugins/zsh-nvm
8772
fi
73+
74+
# neovim
75+
# if ! command -v nvim &> /dev/null
76+
# then
77+
# brew install neovim
78+
# fi
79+
80+
# check if `vim-plug` is installed
81+
# this could be maintained with dotfiles, but better to get a current `plug.vim` file
82+
if [ ! -f "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim ]; then
83+
echo "Installing vim-plug for Neovim..."
84+
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
85+
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
86+
echo "vim-plug for Neovim installed."
87+
fi
88+
89+
# install vim/neovim plugins
90+
if [ ! -d "$HOME/.vim/plugged" ]; then
91+
echo Installing plugins...
92+
nvim +'PlugInstall --sync' +qa
93+
echo Plugins installed.
94+
fi

0 commit comments

Comments
 (0)