create-symlinks.sh
1 |
|
2 |
# directory and the locations where they are ought to be found. |
3 |
# Run this file in the repository's directory, otherwise the files will not be |
4 |
# found! |
5 |
|
6 |
# Store the directory of this script (line from |
7 |
# https://stackoverflow.com/a/246128) |
8 |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
9 |
|
10 |
function makeAndChange { |
11 |
mkdir $1 |
12 |
cd $1 |
13 |
} |
14 |
|
15 |
# In case it doesn't exist yet: |
16 |
mkdir ~/.config |
17 |
|
18 |
# i3 |
19 |
makeAndChange ~/.config/i3 |
20 |
ln -s $DIR/i3/config config |
21 |
cd $DIR |
22 |
|
23 |
# Polybar |
24 |
makeAndChange ~/.config/polybar |
25 |
ln -s $DIR/polybar/config config |
26 |
cd $DIR |
27 |
|
28 |
# ZSH |
29 |
cd ~ |
30 |
ln -s $DIR/.zshrc .zshrc |
31 |
ln -s $DIR/.zlogin .zlogin |
32 |
cd $DIR |
33 |
|
34 |
# X11 and Urxvt |
35 |
cd ~ |
36 |
ln -s $DIR/.Xdefaults .Xdefaults |
37 |
|
38 |
# GNU Emacs |
39 |
ln -s $DIR/.spacemacs .spacemacs |
40 |
|
41 |
# Neovim |
42 |
makeAndChange ~/.config/nvim |
43 |
ln -s $DIR/.vimrc init.vim |
44 |
cd $DIR |
45 |
|
46 |
# Ranger |
47 |
makeAndChange ~/.config/ranger |
48 |
ln -s $DIR/ranger/rc.conf rc.conf |
49 |
ln -s $DIR/ranger/rifle.conf rifle.conf |
50 |
cd $DIR |
51 |