forked from Elemecca/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·49 lines (37 loc) · 776 Bytes
/
setup.sh
File metadata and controls
executable file
·49 lines (37 loc) · 776 Bytes
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
#!/bin/bash
set -e
dir=$(dirname $(realpath $0))
cd $HOME
move_link () {
# convert the destination to an absolute path
dest=$(realpath $2)
target=$(realpath --relative-to=$(dirname $dest) $1)
if [[ -e "$2" ]]; then
mv "$2" "$2.old"
fi
ln -s "$1" "$2"
}
normal () {
move_link "$dir/$1" ".$1"
}
special () {
move_link "$1" "$2"
}
normal bash_logout
normal bashrc
normal dircolors
normal hgignore
normal hgrc
normal gitconfig
normal gitignore
normal profile
normal vim
normal Xresources
normal xmobarrc
normal stalonetrayrc
special .vim/vimrc .vimrc
mkdir -p .gnupg
special ../.files/gpg.conf .gnupg/gpg.conf
special ../.files/gpg-agent.conf .gnupg/gpg-agent.conf
mkdir -p .xmonad
special ../.files/xmonad.hs .xmonad/xmonad.hs