-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
97 lines (84 loc) · 1.98 KB
/
bootstrap.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
#!/usr/bin/env bash
#git pull origin master;
echo "Preparing your environment..."
# Homebrew
if test ! $(which brew); then
echo "Installing Homebrew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
echo "Checking for Homebrew Updates..."
brew update
brews () {
echo "$PROMPT This will install all the basic Homebrew dev apps"
echo "$PROMPT Proceed? (y/n)"
read resp
if [ "$resp" = 'y' -o "$resp" = 'Y' ] ; then
FORMULAE=(
git
rbenv
grep
zsh
zsh-completions
tmux
neovim
ffmpeg
imagemagick
fzf
node
yarn
gnupg
pinentry-mac
)
echo "Installing formulae..."
brew install ${FORMULAE[@]}
# brew install caskroom/cask/brew-cask
CASKS=(
1password
atom
iterm2
slack
rectangle
sequel-pro
sourcetree
itsycal
lepton
brave-browser
google-chrome
karabiner-elements
)
echo "Installing apps..."
brew cask install ${CASKS[@]}
echo "$PROMPT Brewing complete"
else
echo "$PROMPT Brewing cancelled by user"
return 1
fi
}
link () {
echo "$PROMPT This utility will symlink the files in this repo to the home directory"
echo "$PROMPT Proceed? (y/n)"
read resp
# TODO - regex here?
if [ "$resp" = 'y' -o "$resp" = 'Y' ] ; then
for file in $( ls -A | grep -vE '\.exclude*|\.example|\.git/|\.gitignore|bootstrap.sh|\.DS_Store|\.vim|\.osx|iterm|fonts|.*.md' ) ; do
ln -sv "$PWD/$file" "$HOME"
done
# TODO copy
# .vim/autoload &
# .vim/colors
# TODO Symlink
# .config/nvim/init.vim
# .config/karabiner/karabiner.json
# .config/tmux/tmux-status.conf
# TODO: source files here?
echo "$PROMPT Symlinking complete"
else
echo "$PROMPT Symlinking cancelled by user"
return 1
fi
}
#doIt;
brews;
link; # would rather symlink so changes only need to be made once
exec ${SHELL} -l #reload