blob: 7c4b382fa3914c59b1df3c1dbeb88cac7fc6e44a (
plain)
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
|
#!/bin/bash
# Matt Kohls 2017
# License GPLv3 or later
# Save dir of where we start from to link back to
DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ~
# Start with .bashrc
if [[ -e .bashrc ]] ; then
cp .bashrc .bashrc.original
fi
ln -s "$DIR"/.bashrc ~/.bashrc
# Next .vim(rc)
if [[ -e .vimrc ]] ; then
cp .vimrc .vimrc.original
fi
if [[ -e .vim ]] ; then
cp -r .vim .vim.original
fi
ln -s "$DIR"/.vimrc ~/.vimrc
ln -s "$DIR"/.vim ~/.vim
# Next .git
if [[ -e .gitconfig ]] ; then
cp .gitconfig .gitconfig.original
fi
if [[ -e .gitignore_global ]] ; then
cp .gitignore_global .gitignore_global.original
fi
ln -s "$DIR"/.gitconfig ~/.gitconfig
ln -s "$DIR"/.gitignore_global ~/.gitignore_global
# .config stuff
cd ~
if [[ ! -e .config ]] ; then
mkdir .config
fi
# Neovim
cd .config
if [[ -e nvim ]] ; then
cp -r nvim nvim.original
fi
ln -s "$DIR"/nvim ~/.config/nvim
|