-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy
executable file
·78 lines (65 loc) · 1.46 KB
/
deploy
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
74
75
76
77
78
#!/bin/bash
set -e
set -u
readonly CONFIG_DIR=.config
# Files in ~/
readonly HOME_FILES=".Xresources
.bash_aliases
.bash_profile
.bashrc
.fehbg
.gitconfig
.gitglobalignore
.oh-my-zsh
.speedmap
.tmux.conf
.vim
.vimrc
.xinitrc
.zsh_aliases
.zshrc"
# Files in ~/.config
readonly CONFIG_FILES="alacritty
awesome
base16-shell
i3
polybar
procps
sway
user-dirs.dirs
waybar"
# Make sure the config directory exists
mkdir -p $HOME/$CONFIG_DIR
# All of these guys go in homedir
for link in $HOME_FILES; do
ln -sf $PWD/$link $HOME/
done
# All of these guys go in the config dir
for link in $CONFIG_FILES; do
ln -sf $PWD/$link $HOME/$CONFIG_DIR/
done
# Support older versions of top
ln -sf $PWD/procps/toprc $HOME/.toprc
# Check for nvim and deploy vim files
if which nvim &> /dev/null ; then
readonly NVIM_DIR=$HOME/$CONFIG_DIR/nvim
# Check to see if this already exists
# perhaps from running this script previously.
# Try to remove it if it does, non-recursively
if [ -d "$NVIM_DIR" ];
then
rm $NVIM_DIR
fi
# Link
ln -sf $HOME/.vim $NVIM_DIR
fi
# Deploy all the custom plugins for zsh
readonly ZSH_PLUGINS=$HOME/.oh-my-zsh/custom/plugins/
if [ -d "$ZSH_PLUGINS" ]; then
for plugin in `ls $PWD/zsh_plugins/`; do
ln -sf $PWD/zsh_plugins/$plugin $ZSH_PLUGINS/
done
fi
# Deploy fzf
ln -sf $PWD/fzf $HOME/.fzf
ln -sfn $PWD/linuxexecs $HOME/bin