-
Notifications
You must be signed in to change notification settings - Fork 3
/
bootstrap.sh
executable file
·55 lines (47 loc) · 1.52 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
#!/bin/bash
SOURCE=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd $SOURCE
git pull origin master;
# Symlink dotfiles
function link() {
ln -s ${SOURCE}/.aliases ~/.aliases
ln -s ${SOURCE}/.hushlogin ~/.hushlogin
ln -s ${SOURCE}/.motd ~/.motd
ln -s ${SOURCE}/.screenrc ~/.screenrc
ln -s ${SOURCE}/.vimrc ~/.vimrc
ln -s ${SOURCE}/.zshrc ~/.zshrc
ln -s ${SOURCE}/.gitconfig ~/.gitconfig
ln -s ${SOURCE}/.gitignore_global ~/.gitignore_global
ln -s ${SOURCE}/starship.toml ~/.config/starship.toml
}
# Install ZSH
if [ ! -s "${HOME}/.oh-my-zsh" ]
then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
rm ~/.zshrc
# Custom plugins
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
fi
link;
unset link;
# Setup VIM
# Plugged plugin manager
if [ ! -s "$HOME/.vim/autoload/plug.vim" ]
then
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
fi
# If we're on a Mac, let's setup homebrew and macOS config.
if [ "$(uname -s)" = "Darwin" ]
then
if [ -x "$(command -v foo)" ]
then
# Install Brew (https://brew.sh/)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Install Dependencies
brew bundle
# Run macos configuration
source .macos;
fi
source ~/.zshrc;