Fix symlinking bug
- Author
- Maarten Vangeneugden
- Date
- Oct. 8, 2017, 2:05 a.m.
- Hash
- 14e2ec130ccc03aee0f3b4d90af6c2e890dbeb81
- Parent
- 205c90802eaea634d524f452d972c1ca574e9766
- Modified file
- create-symlinks.sh
create-symlinks.sh ¶
25 additions and 10 deletions.
View changes Hide changes
1 |
1 |
# directory and the locations where they are ought to be found. |
2 |
2 |
# Run this file in the repository's directory, otherwise the files will not be |
3 |
3 |
# found! |
4 |
4 |
|
5 |
5 |
# In case it doesn't exist yet: |
+ |
6 |
# https://stackoverflow.com/a/246128) |
+ |
7 |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
+ |
8 |
|
+ |
9 |
function makeAndChange { |
+ |
10 |
mkdir $1 |
+ |
11 |
cd $1 |
+ |
12 |
} |
+ |
13 |
|
+ |
14 |
# In case it doesn't exist yet: |
6 |
15 |
mkdir ~/.config |
7 |
16 |
|
8 |
17 |
# i3 |
9 |
18 |
mkdir ~/.config/i3 |
10 |
- | ln -s i3/config ~/.config/i3/config |
11 |
- | |
+ |
19 |
ln -s $DIR/i3/config config |
+ |
20 |
cd $DIR |
+ |
21 |
|
12 |
22 |
# Polybar |
13 |
23 |
mkdir ~/.config/polybar |
14 |
- | ln -s polybar/config ~/.config/polybar/config |
15 |
- | |
+ |
24 |
ln -s $DIR/polybar/config config |
+ |
25 |
cd $DIR |
+ |
26 |
|
16 |
27 |
# ZSH |
17 |
28 |
ln -s .zshrc ~/.zshrc |
18 |
- | ln -s .zlogin ~/.zlogin |
19 |
- | |
+ |
29 |
ln -s $DIR/.zshrc .zshrc |
+ |
30 |
ln -s $DIR/.zlogin .zlogin |
+ |
31 |
cd $DIR |
+ |
32 |
|
20 |
33 |
# X11 and Urxvt |
21 |
34 |
ln -s .Xdefaults ~/.Xdefaults |
22 |
- | |
+ |
35 |
ln -s $DIR/.Xdefaults .Xdefaults |
+ |
36 |
|
23 |
37 |
# GNU Emacs |
24 |
38 |
ln -s .spacemacs ~/.spacemacs |
25 |
- | |
+ |
39 |
|
26 |
40 |
# Neovim |
27 |
41 |
mkdir ~/.config/nvim |
28 |
- | ln -s .vimrc ~/.config/nvim/init.vim |
29 |
- | |
+ |
42 |
ln -s $DIR/.vimrc init.vim |
+ |
43 |
cd $DIR |
+ |
44 |