-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·64 lines (50 loc) · 1.38 KB
/
setup.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
#!/usr/bin/env bash
set -e
P=$(pwd -P)
link() {
if [ -h $2 ]; then
echo "$2 exists. Relinking."
sudo rm $2;
else
echo "Linking $2."
fi
if [ ! -d $(dirname $2) ]; then
echo "Making directory $(dirname $2)"
mkdir -p $(dirname $2)
fi
if [[ $1 == /* ]]; then
ln -s $1 $2
else
ln -s $P/$1 $2
fi
}
link bin ~/bin
link irbrc.rb ~/.irbrc
link gemrc ~/.gemrc
link psqlrc.sql ~/.psqlrc
link sqlite.sql ~/.sqliterc
link xinitrc ~/.xinitrc
link xmodmap ~/.Xmodmap
link vim ~/.config/nvim
link config.fish ~/.config/fish/config.fish
link dunstrc ~/.config/dunst/dunstrc
link ranger.conf ~/.config/ranger/rc.conf
link cmus.conf ~/.config/cmus/rc
link konsole/konsolerc ~/.config/konsolerc
link i3/conf ~/.config/i3/config
link i3/blocks.conf ~/.config/i3blocks/config
link git/config ~/.gitconfig
link git/ignore ~/.gitignore
link git/message ~/.gitmessage
link git/template ~/.gittemplate
# We don't want this in the repo. We just keep the template
if [[ ! -a ~/.gituser ]]; then
cp git/user ~/.gituser
fi
link konsole/ ~/.local/share/konsole
# link bin/keylight /etc/pm/sleep.d/10keylight
# link services/syncthing.service /etc/systemd/system/syncthing.service
if which yay >/dev/null 2>&1; then
echo "Installing arch packages."
cat arch-packages.txt | xargs yay -Sy --noconfirm --needed
fi