-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap.sh
145 lines (125 loc) · 2.97 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#!/usr/bin/env bash
# Check for Homebrew,
# Install if we don't have it
if test ! "$(which brew)"; then
echo "> Installing homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
if test ! "$(which brew)"; then
echo ""
echo "> Homebrew install failed! Try again manually by running"
echo "> /bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\""
echo ""
fi
# Update homebrew recipes
brew update
HOMEBREW_PATH="$(brew --prefix)/bin"
# Install and use latest fish
echo "> Changing shell to latest fish version..."
brew install fish
echo "$HOMEBREW_PATH/fish" | sudo tee -a /etc/shells > /dev/null
chsh -s "$HOMEBREW_PATH/fish"
# Install useful binaries
binaries=(
deno
entr
fzf
gh
git
git-delta
go
goreleaser/tap/goreleaser
hugo
gojq # jq replacement
mas
neovim
rename
terminal-notifier
trash
shellcheck
ssh-copy-id
upx
wget
xh
yt-dlp/taps/yt-dlp # youtube-dl replacement
zig # used for cross-compiling some Go binaries
zola
)
echo "> Installing useful binaries..."
brew install "${binaries[@]}"
# Install node via volta
echo "> Installing node..."
curl https://get.volta.sh | bash
volta install node
volta install yarn
# Some npm defaults
yarn config set init-license "MIT"
yarn config set init-version "0.0.1"
# Install useful node modules
modules=(
serve
svgo
)
echo "> Installing useful node modules..."
yarn global add "${modules[@]}"
# Install applications
masapps=(
904280696 # Things
1487937127 # Craft
775737590 # iA Writer
409183694 # Keynote
409203825 # Numbers
409201541 # Pages
1289583905 # Pixelmator Pro
824183456 # Affinity Photo
824171161 # Affinity Designer
1475387142 # Tailscale
)
echo "> Install App Store applications..."
mas signin "ross@rosszurowski.com"
mas install "${masapps[@]}"
apps=(
1password
1password/tap/1password-cli
arq
audio-hijack
cleanshot
daisydisk
figma
firefox
iterm2
imageoptim
mimestream
notion
raycast
signal
slack
spotify
sketch
transmission
transmit
visual-studio-code
vlc
)
echo "> Installing applications..."
brew install --cask --appdir="/Applications" "${apps[@]}"
echo "> Installing font library..."
script/fonts-download
echo "> Setting up Raycast..."
echo "> Fetching password from 1Password..."
pw=$(op read "op://z4w6n6rguudu6xchl37at3pshe/pe4irhzmd7qxlq7fgp7v6ihlvu/password")
echo "> Password: $pw"
open ./raycast/settings.rayconfig
# Set up GPG keys
script/setup-gpg
# Clone this repo into ./dotfiles
read -r -p "Choose where to clone the dotfiles repo: " -i "$HOME/Developer/dotfiles" -e CLONE_PATH
echo "> Cloning into dotfiles repo..."
mkdir -p "$CLONE_PATH"
git clone https://github.com/rosszurowski/dotfiles "$CLONE_PATH"
# Linking dotfiles
echo "> Linking dotfiles to $HOME..."
cd "$CLONE_PATH" && script/setup
# Remove outdated versions from the cellar
echo "> Cleaning up..."
brew cleanup