-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
37 lines (28 loc) · 1.05 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
#!/usr/bin/env bash
############################
# This script creates symlinks from the home directory to any desired dotfiles in ${homedir}/dotfiles
# And also installs Homebrew Packages
############################
if [ "$#" -ne 1 ]; then
echo "Usage: install.sh <home_directory>"
exit 1
fi
homedir=$1
# dotfiles directory
dotfiledir=${homedir}/dotfiles
# list of files/folders to symlink in ${homedir}
files="zshrc tmux.conf"
# change to the dotfiles directory
echo "Changing to the ${dotfiledir} directory"
cd ${dotfiledir}
echo "...done"
# create symlinks (will overwrite old dotfiles)
for file in ${files}; do
echo "Creating symlink to $file in home directory."
ln -sf ${dotfiledir}/.${file} ${homedir}/.${file}
done
# Install Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Install Plugins
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm