-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·73 lines (50 loc) · 1.67 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
65
66
67
68
69
70
71
72
73
set -xeuo pipefail
pushd $(dirname $0)
SCRIPTPATH=$(pwd)
USER_HOME=$HOME
: ${1?"Usage: $0 machine-name"}
test -e $SCRIPTPATH/nix/machines/${1}.nix || exit 99
rm -rf $HOME/.dotfiles
ln -s $SCRIPTPATH/. $HOME/.dotfiles
rm -rf $SCRIPTPATH/nix/machine.nix
ln -s $SCRIPTPATH/nix/machines/${1}.nix $SCRIPTPATH/nix/machine.nix
git submodule update --init --recursive || true
rm -f $HOME/.dircolors
ln -s $SCRIPTPATH/.dircolors $HOME/.dircolors
rm -f $HOME/.Xresources
ln -s $SCRIPTPATH/.Xresources $HOME/.Xresources
rm -f $HOME/.zshenv
ln -s $SCRIPTPATH/.zshenv $HOME/.zshenv
rm -f $HOME/.zshrc
ln -s $SCRIPTPATH/.zshrc $HOME/.zshrc
rm -f $HOME/.tmux.conf
ln -s $SCRIPTPATH/.tmux.conf $HOME/.tmux.conf
rm -rf $HOME/.oh-my-zsh
ln -s $SCRIPTPATH/third_party/oh-my-zsh $HOME/.oh-my-zsh
rm -rf $HOME/.oh-my-zsh/custom/themes/powerlevel10k
mkdir -p ~/.oh-my-zsh/custom/themes
ln -s $SCRIPTPATH/third_party/powerlevel10k $HOME/.oh-my-zsh/custom/themes/powerlevel10k
rm -rf $HOME/.i3
ln -s $SCRIPTPATH/.i3 $HOME/.i3
rm -rf $HOME/.i3status.conf
ln -s $SCRIPTPATH/.i3status.conf $HOME/.i3status.conf
rm -rf $HOME/.emacs.d
ln -s $SCRIPTPATH/third_party/spacemacs $HOME/.emacs.d
rm -rf $HOME/.spacemacs
ln -s $SCRIPTPATH/.spacemacs $HOME/.spacemacs
rm -rf $HOME/.config/termite
mkdir -p $HOME/.config
ln -s $SCRIPTPATH/termite $HOME/.config/termite
rm -rf $HOME/.gitconfig
ln -s $SCRIPTPATH/.gitconfig $HOME/.gitconfig
rm -rf $HOME/.p10k.zsh
ln -s $SCRIPTPATH/.p10k.zsh $HOME/.p10k.zsh
rm -rf $HOME/.expressvpn
ln -s $SCRIPTPATH/.expressvpn $HOME/.expressvpn
rm -rf $HOME/.background-image
ln -s $SCRIPTPATH/.background-image $HOME/.background-image
popd
cleanup() {
popd || true
}
trap cleanup EXIT