This repository has been archived by the owner on Nov 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
80 lines (70 loc) · 1.93 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
#!/bin/bash
check_dependency () {
dpkg -s $1 > /dev/null 2> /dev/null
if [$? -eq 1]; then
echo "missing " $1
return 1
fi
return 0
}
echo "Would you like to deploy:"
echo -n "i3 (y/N) :"
read deploy_i3
if [ $deploy_i3 = "y" ]; then
if [check_dependency i3]; then return 1; fi
echo "deploying i3 config files..."
cp ./i3/config ~/.config/i3/
cp ./i3/i3blocks.conf ~/i3/i3blocks/
echo "done, press <Meta>+<S-r> to reload environment"
else
echo "pass"
fi
echo -n "tmux (y/N) :"
read deploy_tmux
if [ $deploy_tmux = "y" ]; then
if [check_dependency git]; then return 1; fi
if [check_dependency tmux]; then return 1; fi
echo "deploying tmux config files..."
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
cp .tmux.conf ~/
echo "done, if sessions are open press <C-space>I to reload environment"
else
echo "pass"
fi
echo -n "vim (y/N) :"
read deploy_vim
if [ $deploy_vim = "y" ]; then
if [check_dependency curl]; then return 1; fi
if [check_dependency git]; then return 1; fi
echo "deploying vim config files..."
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim;
cp .vimrc ~/
echo "done, run :PlugInstall to finish"
else
echo "pass"
fi
echo -n "neovim (y/N) :"
read deploy_neovim
if [ $deploy_neovim = "y" ]; then
if [check_dependency wget]; then return 1; fi
if [check_dependency git]; then return 1; fi
echo "deploying vim config files..."
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
~/.local/share/nvim/site/pack/packer/start/packer.nvim
cp -rf nvim ~/.config/
echo "done, run :PackerInstall to finish"
else
echo "pass"
fi
echo -n "vim-wiki (y/N) :"
read deploy_vimwiki
if [ $deploy_vimwiki = "y" ]; then
if [check_dependency git]; then return 1; fi
echo "deploying vim-wiki files..."
git clone git@github/antoinelemarchand/wiki.git ~/vimwiki
echo "done, open index file with <Leader>ww"
else
echo "pass"
fi
return 0