-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup
executable file
·40 lines (34 loc) · 918 Bytes
/
setup
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
#!/bin/zsh
function create_symlinks {
symlinks=(vimrc gitconfig tmux.conf editorconfig)
for symlink in $symlinks; do
echo "Creating symlink to ~/.$symlink"
ln -sf $PWD/$symlink ~/.$symlink
done
}
function clone_or_upgrade_repository {
repository=$1
destination=$2
if [[ ! -d $destination ]]; then
git clone --recursive $repository $destination
else
pushd $destination
git pull --recurse-submodules
popd
fi
}
function configure_vim {
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
vim -c "PlugUpdate!" -c ":q!" -c ":q!"
}
function configure_zsh {
echo "Creating symlink to ~/.zshrc"
ln -sf $PWD/zsh/zshrc ~/.zshrc
}
function configure_base16 {
clone_or_upgrade_repository https://github.com/chriskempson/base16-shell.git /home/quique/.config/base16-shell
}
create_symlinks
configure_base16
configure_vim
configure_zsh