-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·58 lines (46 loc) · 1.46 KB
/
install.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
#!/bin/sh
inst() {
echo "Installing $2 as $1..."
if [ -e $1 ]; then
if [ -h $1 ]; then
echo " Removing symlink $1"
rm $1 # remove existing symbolic links
else
echo " Backing up file $1"
mv $1 $1.bak # backup existing files
fi
fi
ln -s $2 $1 # symlink
}
FROM=$(pwd)
TO=~
echo "Initializing git submodules..."
git submodule update --init --recursive
mkdir -p $TO/.config
mkdir -p $TO/.local/share/nvim/site/autoload
echo "Installing from $FROM to $TO"
inst $TO/.xinitrc $FROM/xinitrc
inst $TO/.zshrc $FROM/zshrc
inst $TO/.gitconfig $FROM/gitconfig
inst $TO/.tmux.conf $FROM/tmux.conf
inst $TO/.gtk-bookmarks $FROM/gtk-bookmarks
inst $TO/.xmodmap $FROM/xmodmap
inst $TO/.config/flake8 $FROM/flake8
inst $TO/.config/nvim $FROM/nvim
inst $TO/.local/share/nvim/site/autoload/plug.vim $FROM/nvim/plug.vim
echo "Installing $FROM/fonts/* as $TO/.fonts/*..."
mkdir -p $TO/.fonts
cp -rf $FROM/fonts/* $TO/.fonts/
echo "Installing $FROM/themes/* as $TO/.themes/*..."
mkdir -p $TO/.themes
cp -rf $FROM/themes/* $TO/.themes/
mkdir -p $TO/.config/openbox
inst $TO/.config/openbox/rc.xml $FROM/openbox-rc.xml
mkdir -p $TO/.ipython/profile_default
inst $TO/.ipython/profile_default/ipython_config.py $FROM/ipython_config.py
mkdir -p $TO/.config/alacritty
bin/set-alacritty-theme.sh dark
inst $TO/.config/alacritty/alacritty.yml $FROM/alacritty.yml
bin/set-prompt-theme.sh default
mkdir -p $TO/.config/tint2
inst $TO/.config/tint2/tint2rc $FROM/tint2rc