-
Notifications
You must be signed in to change notification settings - Fork 4
/
bootstrap.sh
executable file
·61 lines (47 loc) · 1.73 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
#!/bin/sh
set -e
WHOAMI=$(whoami)
SPACEMACS_DIR="/Users/${WHOAMI}/.emacs.d"
TMUX_TPM_DIR="/Users/${WHOAMI}/.tmux/plugins/tpm"
ZSH_CUSTOM_PLUGINS_DIR="/Users/${WHOAMI}/.oh-my-zsh/custom/plugins"
FONTS_CUSTOM_DIR="/Users/${WHOAMI}/.dotfiles/fonts"
FONTS_LOCAL_DIR="/Users/${WHOAMI}/Library/Fonts"
# Validate .emacs.d is present if not clone spacemacs
if [ ! -d ${SPACEMACS_DIR} ]; then
echo "Installing Spacemacs..."
git clone [email protected]:syl20bnr/spacemacs.git ${SPACEMACS_DIR}
fi
# Validate Homebrew is installed
if [ ! $(which brew) ]; then
echo "Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Validate .oh-my-zsh is present
if [ ! -d ${OH_MY_ZSH_DIR} ]; then
echo "Installing oh-my-zsh..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
# Validate .oh-my-zsh custom plugins is present
if [ ! -d ${ZSH_CUSTOM_PLUGINS_DIR} ]; then
echo "Installing custom plugins..."
git clone [email protected]:mroth/evalcache.git ${ZSH_CUSTOM_PLUGINS_DIR}
fi
# Validate TMUX TPM is present
if [ ! -d ${TMUX_TPM_DIR} ]; then
echo "Installing tmux tpm..."
git clone https://github.com/tmux-plugins/tpm ${TMUX_TPM_DIR}
fi
echo "Installing all dotfiles"
/usr/bin/rake link
# Install Homebrew dependencies
echo "Installing all dependencies via Homebrew..."
/opt/homebrew/bin/brew bundle install -v --global
# Set zsh as the default shell
chsh -s /bin/zsh
echo "Installing tmux plugins..."
bash $TMUX_TPM_DIR/bin/install_plugins
echo "Creating directory tree for Development..."
/usr/bin/rake working_dir
echo "Installing fonts..."
cp ${FONTS_CUSTOM_DIR}/*.{otf,ttf} ${FONTS_LOCAL_DIR}/
echo "Done."