-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_symlinks.sh
executable file
·48 lines (38 loc) · 1.23 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
#!/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; 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
# 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; 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