-
Notifications
You must be signed in to change notification settings - Fork 2
/
deploy.sh
executable file
·90 lines (81 loc) · 2.89 KB
/
deploy.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/zsh
# @file deploy.sh
# @brief Configuration deployment script.
# @author clemedon (Clément Vidon)
echo "Before to continue, make sure that 'config/' is located in your home directory."
read -p "Continue? y/n " choice
if [[ "$choice" == "n" ]]; then
exit 0
fi
if command -v bash &> /dev/null; then
{
ln -fsv "$HOME/config/.bashrc" "$HOME/.bashrc"
} 1>/dev/null
echo "bash OK"
fi
if command -v zsh &> /dev/null; then
{
# ln -fsv "$HOME/config/.ideavim" "$HOME/.ideavim"
ln -fsv "$HOME/config/.zshrc" "$HOME/.zshrc"
ln -fsv "$HOME/config/.zshenv" "$HOME/.zshenv"
mkdir -pv "$HOME/.local/script"
ln -fsv "$HOME/config/.local/script/"* "$HOME/.local/script/"
} 1>/dev/null
echo "zsh OK"
fi
if command -v git &> /dev/null; then
{
ln -fsv "$HOME/config/.gitmessage" "$HOME/.gitmessage"
ln -fsv "$HOME/config/.gitconfig" "$HOME/.gitconfig"
ln -fsv "$HOME/config/.gitignore" "$HOME/.gitignore"
} 1>/dev/null
echo "git OK"
fi
if command -v tmux &> /dev/null; then
{
ln -fsv "$HOME/config/.tmux.conf" "$HOME/.tmux.conf"
} 1>/dev/null
echo "tmux OK"
fi
if command -v alacritty &> /dev/null; then
{
mkdir -pv "$HOME/.fonts"
ln -fsv "$HOME/config/.fonts/"*.ttc "$HOME/.fonts/"
mkdir -pv "$HOME/.config/alacritty/colors"
ln -fsv "$HOME/config/alacritty/"*.toml "$HOME/.config/alacritty/"
ln -fsv "$HOME/config/alacritty/colors/"*.toml "$HOME/.config/alacritty/colors/"
} 1>/dev/null
echo "alacritty OK"
fi
#if command -v i3 &> /dev/null; then
# {
# ln -fsv "$HOME/config/.xinitrc" "$HOME/.xinitrc"
# ln -fsv "$HOME/config/.Xresources" "$HOME/.Xresources"
# mkdir -pv "$HOME/.config/i3/"
# ln -fsv "$HOME/config/i3/config" "$HOME/.config/i3/"
# mkdir -pv "$HOME/.local/script/i3"
# ln -fsv "$HOME/config/.local/script/i3/"* "$HOME/.local/script/i3/"
# mkdir -pv "$HOME/.icons"
# ln -fsv "$HOME/config/.icons/"* "$HOME/.icons/"
# } 1>/dev/null
# echo "i3 OK"
#fi
if command -v vim &> /dev/null || command -v nvim &> /dev/null; then
{
bash vim/vimrc_gen.sh
} 1>/dev/null
vim -c ':PlugUpdate | :q | :q'
echo "vim OK"
fi
#if command -v clang-format &> /dev/null; then
# {
# echo "1"
# mkdir -pv "$HOME/.config/clang-format/"
# echo "2"
# ln -fsv "$HOME/config/clang-format/".clang-format-* "$HOME/.config/clang-format/"
# echo "3"
# echo "clang-format OK"
# echo "4"
# } 1>/dev/null
#fi
echo "Installation DONE"