-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·107 lines (91 loc) · 2.04 KB
/
install.sh
File metadata and controls
executable file
·107 lines (91 loc) · 2.04 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#!/bin/bash
date=$(date '+%Y-%m-%d--%H-%M-%S')
echo "Creating .custom-preferences.vim file"
touch ./.vim/custom-preferences.vim
echo "Do you want to clone vim plugins? (y/n)"
read
if [[ $REPLY == 'y' ]]
then
source ./install-vim-plugins.sh
fi
echo ""
echo "----------"
echo "Do you want to create an undo history folder in .vim/ ? (y/n)"
read
if [[ $REPLY == 'y' ]]
then
mkdir ./.vim/undo
fi
echo ""
echo "----------"
echo "Do you want to clone tmux clipboard plugin? (y/n)"
read
if [[ $REPLY == 'y' ]]
then
git clone https://github.com/tmux-plugins/tmux-yank.git .tmux/tmux-yank
fi
echo ""
echo "----------"
function check_file () {
if [[ -f /home/$USER/$1 ]]
then
echo ""
echo "A $1 file already exists... would you like to create a bk and replace it? (y/n)"
read
if [[ $REPLY == "y" ]]
then
mv /home/$USER/$1 /home/$USER/$1.$date.bk
ln -s $PWD/$1 /home/$USER/$1
echo ""
echo "$1 updated"
echo ""
echo "----------"
else
echo ""
echo "$1 not changed"
echo ""
echo "----------"
fi
else
echo ""
echo "$1 updated"
echo ""
echo "----------"
ln -s $PWD/$1 /home/$USER/$1
fi
}
check_file ".vimrc"
check_file ".tmux.conf"
check_file ".bashrc"
check_file ".profile"
check_file ".vim"
check_file ".tmux"
echo "Do you want to install coc.nvim dependencies (tsserver, json, html, css)? (y/n)"
read
if [[ $REPLY == 'y' ]]
then
# Install extensions for coc.nvim
mkdir -p ~/.config/coc/extensions
cd ~/.config/coc/extensions
if [ ! -f package.json ]
then
echo '{"dependencies":{}}'> package.json
fi
# Change extension names to the extensions you need
npm install coc-tsserver coc-json coc-html coc-css --global-style --ignore-scripts --no-bin-links --no-package-lock --only=prod
fi
cd ~/.vim/bundle/coc.nvim
echo ""
echo "----------"
echo "Do you want to install fzf? (y/n)"
read
if [[ $REPLY == 'y' ]]
then
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
fi
echo ""
echo "----------"
echo ""
echo "DONE"
echo ""