-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-server.sh
executable file
·46 lines (39 loc) · 1.32 KB
/
setup-server.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
#!/bin/bash
#
# Create symlinks from expeted dotfile locations to this repo
# This should only be run by the Makefile, from the repository root
# Variables
repo_dir=$(pwd)
ln_flags='-svn'
mkdir -p ~/.config/nvim
# Crate symlinks (will fail if file exists)
ln $ln_flags $repo_dir/git/gitignore ~/.gitignore
ln $ln_flags $repo_dir/tmux/tmux.conf ~/.tmux.conf
ln $ln_flags $repo_dir/vim/lite-vimrc.vim ~/.vimrc
ln $ln_flags $repo_dir/zsh/zshenv ~/.zshenv
ln $ln_flags $repo_dir/zsh/zshrc ~/.zshrc
# Create empty local zshrc if one doesn't exist
touch $HOME/.zshrc.local
# Install vim-plug
if [[ -f "$HOME/.vim/autoload/plug.vim" ]]; then
echo "vim-plug already installed"
else
curl -fLo $HOME/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
fi
# Install tpm
if [[ -d "$HOME/.tmux/plugins/tpm" ]]; then
echo "tmux plugin manager already installed"
else
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
fi
# Basic git settings
touch ~/.gitignore
git config --global core.excludesfile ~/.gitignore
git config --global core.pager 'less -x4'
git config --global pull.rebase true
git config --global advice.skippedCherryPicks false
git config --global diff.colorMoved zebra
git config --global init.defaultBranch main
echo 'make server executed succesfully'
exit 0