forked from pvrego/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_symlinks.sh
executable file
·64 lines (52 loc) · 1.65 KB
/
create_symlinks.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
# Home folder dotfiles
for F in .bashrc .vimrc .inputrc .tmux.conf .xpdfrc .signature .Xresources \
.Xmodmap .xinitrc .xprofile .zshrc .conkyrc .xbindkeysrc .gitconfig \
.vimperatorrc .vimpcrc .compton.conf .locale .ctags .spacemacs \
.juliarc.jl .mailcap .offlineimaprc .msmtprc .notmuch-config; do
SOURCE=$PWD/$F
TARGET=~/$F
# Check if file exists, rename if so
[ -f $TARGET ] && mv $TARGET ${TARGET}_bck
rm $TARGET
echo "Symlink: $SOURCE -> $TARGET"
ln -s $SOURCE $TARGET
done
mkdir -p ~/.ipython/profile_default
# Home folder dotfolders
for F in .colors .config/uzbl .config/awesome .config/dwb .config/bspwm \
.config/sxhkd .config/luakit .config/openbox .config/zathura .tmuxinator \
.i3 .mutt .ncmpcpp .vim .vimperrator .w3m wallpapers .kwm .mpd \
.imapfilter .weechat .ipython/profile_default/ipython_config.py; do
SOURCE=$PWD/$F
TARGET=~/$F
# Check if file exists, rename if so
[ -f $TARGET ] && mv $TARGET ${TARGET}_bck
rm -rf $TARGET
echo "Symlink: $SOURCE -> $TARGET"
ln -s $SOURCE $TARGET
done
mkdir -p ~/bin
# Home folder bin directory
for F in `ls bin/`; do
SOURCE=$PWD/bin/$F
TARGET=~/bin/$F
# Check if file exists, rename if so
[ -f $TARGET ] && mv $TARGET ${TARGET}_bck
rm -rf $TARGET
echo "Symlink: $SOURCE -> $TARGET"
ln -s $SOURCE $TARGET
done
# .xinitrc doesn't work with XQuartz
if [[ "$UNAMESTR" == 'Darwin' ]]; then
rm ~/.xinitrc
fi
# Neovim configuration symlinks
cd $HOME
mkdir -p ${XDG_CONFIG_HOME:=$HOME/.config}
ln -s ~/.vim $XDG_CONFIG_HOME/nvim
ln -s ~/.vimrc $XDG_CONFIG_HOME/nvim/init.vim
cd -
# Mutt cache folder
mkdir -p ~/.mutt/cache
chmod 0700 ~/.mutt/cache