-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·59 lines (50 loc) · 1.53 KB
/
install.sh
File metadata and controls
executable file
·59 lines (50 loc) · 1.53 KB
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
#!/bin/sh
# Globals
MY_DOTFILES=$HOME/.dotfiles
TB_DOTFILES=$HOME/.dotfiles-thoughtbot
# Update default shell
if [ $(basename $SHELL) = "zsh" ]; then
echo "✅ Default shell is zsh."
else
echo "🛠 Setting default shell to zsh..."
chsh -s $(which zsh)
fi
# Install thoughtbot/dotfiles
if [ -e $TB_DOTFILES ]; then
echo "✅ thoughtbot dotfiles installed."
else
echo "🛠 Cloning Thoughtbot dotfiles..."
git clone https://github.com/thoughtbot/dotfiles.git $TB_DOTFILES
fi
# Install tpm
if [ -e ${MY_DOTFILES}/tmux/plugins/tpm ]; then
echo "✅ tpm installed."
else
echo "🛠 Installing tpm..."
git clone https://github.com/tmux-plugins/tpm ${MY_DOTFILES}/tmux/plugins/tpm
fi
# Install Homebrew
if which brew > /dev/null; then
echo "✅ Homebrew installed."
else
echo "🛠 Installing Homebrew..."
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
fi
# Install Homebrew packages
echo "🛠 Installing Homebrew packages..."
brew bundle --file=${MY_DOTFILES}/Brewfile --quiet
# Install Node.js
if which node > /dev/null; then
echo "✅ Node.js installed."
else
echo "🛠 Installing Node.js..."
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf install nodejs latest
asdf global nodejs latest
asdf shell nodejs latest
fi
# Link files with rcup
echo "🔗 Linking dotfiles"
env RCRC=$HOME/.dotfiles/rcrc rcup -q
# Disable macOS character accent press-and-hold for VSCode and Hyper
defaults write -g ApplePressAndHoldEnabled -bool false