-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup
executable file
·75 lines (63 loc) · 2.1 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
# Install vim-plug (plugin manager for vim)
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Install git-bash-prompt
if [ ! -d ~/.bash-git-prompt ]; then
git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt
fi
# Link dotfiles (note: didn't bother to make it work if you're not running from root of repo)
ln -sf `pwd`/.tmux.conf ~
ln -sf `pwd`/.tmux.conf ~
ln -sf `pwd`/.joker ~
# Install tmux plugin manager
if [ ! -d ~/.tmux/plugins/tpm ]; then
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
~/.tmux/plugins/tpm/bin/install_plugins
fi
# Configure screen
ln -sf `pwd`/.screenrc ~
# Configure vim
ln -sf `pwd`/.vimrc ~
ln -sf `pwd`/.ideavimrc ~
mkdir -p ~/.vim/backupdir
mkdir -p ~/.vim/undodir
mkdir -p ~/.vim/swpdir
vim +PlugInstall! +qall
vim -c "CocInstall coc-git"
# for the CocInstall... for some reason -c "qa" seems to execute first no matter if it's first or last??
# Configure mercurial
#ln -sf `pwd`/mercurial/.hgrc ~
#ln -sf `pwd`/mercurial/hgignore.ini ~/.hgignore
# If cygwin, configure mintty
if [[ `uname` == *"CYGWIN"* ]]; then
echo "Installing cygwin specific files"
ln -sf `pwd`/.minttyrc ~
fi
# Configure git
git config --global include.path `pwd`/gitconfig
git config --global core.excludesfile `pwd`/.gitignore
if [ -z `git config --global user.email` ]; then
echo "REMINDER: Tell git your email like this: git config --global user.email \"[email protected]\""
fi
# Configure lein
mkdir -p ~/.lein
ln -sf `pwd`/profiles.clj ~/.lein/
# source .bashrc_dotfiles if .bashrc doesn't already
if [ ! -a ~/.bashrc ]; then
touch ~/.bashrc
fi
if ! grep -q bashrc_dotfiles ~/.bashrc; then
echo "Sourcing bashrc_dotfiles in .bashrc"
echo "\nsource `pwd`/.bashrc_dotfiles" >> ~/.bashrc
. ~/.bashrc
fi
# source .zshrc_dotfiles if .zshrc doesn't already
if [ ! -a ~/.zshrc ]; then
touch ~/.zshrc
fi
if ! grep -q zshrc_dotfiles ~/.zshrc; then
echo "Sourcing zshrc_dotfiles in .zshrc"
echo "\nsource `pwd`/.zshrc_dotfiles" >> ~/.zshrc
. ~/.zshrc
fi