-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall1.sh
executable file
Β·226 lines (178 loc) Β· 5.51 KB
/
install1.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
#!/bin/bash
installMethod ()
{
installAll ()
{
echo "install neccassry packages ....."
pkg update && pkg upgrade
pkg install neovim nodejs clang make ripgrep python glow fish zip rsync tsu openssh tree curl
echo "Install Config and font ......"
cp -Rvup ./nvim/. $HOME/.config/nvim/
cp -Rvup ./fish/. $HOME/.config/fish/
cp -p ./Fonts/jetbrain-mono.ttf $HOME/.termux/font.ttf
echo "Install language servers and formaters ......"
npm install -g typescript-language-server typescript vscode-langservers-extracted pyright @tailwindcss/language-server graphql-language-service-cli @fsouza/prettierd;
pip install --upgrade pip
pip install black
echo "install install essensial node development tools ........."
pnpm install -g dotenv lite-server live-server nodemon esm;
}
installConfigs() {
echo "Do you want to install nvim config type y or Y to eccept ?"
read -r nvim
echo "Do you want to install fish config type y or Y to eccept?"
read -r fish
if [[ $nvim == "y" || $nvim == "Y" ]]; then
cp -Rvup ./nvim/. $HOME/.config/nvim/
else
true
fi
if [[ $fish == "y" || $fish == "Y" ]]; then
echo "Do you want to install fish and set it as your default shell ? y, n"
read -r installFish
if [[ $installFish == "y" || $installFish == "Y" ]]; then
pkg install fish
chsh -s fish
fi
cp -Rvup ./fish/. $HOME/.config/fish/
else
true
fi
if [[ $fish != "y" && $nvim != "y" ]]; then
echo "no config installed"
else
echo "configs installed successfully"
fi
}
installPackages ()
{
echo "Do you want to install neccassry linux packages (y or n) ?"
echo "[ * ] Neovim"
echo "[ * ] Nodejs"
echo "[ * ] Clang"
echo "[ * ] Make"
echo "[ * ] ripgrep"
read -r pkg
if [[ $pkg == "y" ]]; then
pkg update && pkg upgrade;
echo "following packages will be installed: \n node clang \n make ripgrep !"
pkg install neovim nodejs clang make ripgrep;
echo "Do you want to install python ? (y , n)"
read -r python
if [[ $python == "y" ]]; then
pkg install python;
echo "installing python formatter"
pip install black
else
true
fi
echo "do you want to install glow ?"
read -r glow
if [[ $glow == "y" ]]; then
pkg install glow
else
true
fi
echo "Do you want install some essensial packages ? ( y, n)"
echo "[ * ] zip"
echo "[ * ] tsu"
echo "[ * ] rsync"
echo "[ * ] openssh"
echo "[ * ] tree"
echo "[ * ] curl"
read -r essensial
if [[ $essensial == "y" ]]; then
pkg install zip rsync tsu openssh tree curl
else
true
fi
else
true
fi
}
lsp ()
{
echo "Do you want to install language servers ? (y, n)"
echo "[ * ] typescript-language-server"
echo "[ * ] typescript"
echo "[ * ] vscode-langservers-extracted"
echo "[ * ] @tailwindcss/language-server"
echo "[ * ] prettierd"
echo "[ * ] pyright"
echo "[ * ] graphql-language-service-cli"
read -r lsp
if [[ $lsp == "y" ]]; then
npm install -g typescript-language-server typescript vscode-langservers-extracted pyright @tailwindcss/language-server graphql-language-service-cli @fsouza/prettierd
else
true
fi
}
webdiv ()
{
echo "do you want to install web development tool with pnpm ? (y, n)"
echo "[ * ] dotenv"
echo "[ * ] lite-server"
echo "[ * ] live-server"
echo "[ * ] nodemon"
echo "[ * ] esm"
read -r web
if [[ $web == "y" ]]; then
pnpm install -g dotenv lite-server live-server nodemon esm;
else
true
fi
}
font () {
echo "Do you want to install nerd fonts ? (y, n) :"
read -r fon
if [[ $fon == "y" ]]; then
echo "choose your font :"
echo "[ 1 ] Jetbrain Mono"
echo "[ 2 ] Fira Mono"
echo "[ 3 ] Hack"
echo "[ 4 ] Noto Mono"
read -r num
if [[ $num > 0 || $num < 5 ]]; then
mv $HOME/.termux/font.ttf $HOME/.termux/font.ttf.bak
if [[ $num == 1 ]]; then
cp -p ./Fonts/jetbrain-mono.ttf $HOME/.termux/font.ttf
elif [[ $num == 2 ]]; then
cp -p ./Fonts/fira.ttf $HOME/.termux/font.ttf
elif [[ $num == 3 ]]; then
cp ./Fonts/hack.ttf $HOME/.termux/font.ttf
elif [[ $num == 4 ]]; then
cp ./Fonts/noto.ttf $HOME/.termux/font.ttf
fi
fi
fi
}
startNeovim ()
{
echo "do you want to launch nvim ? (y, n)"
read -r launch
if [[ $launch == "y" || $launch == "Y" ]]; then
nvim +'hi NormalFloat guibg=#1e222a' +PackerSync
else
true
fi
}
#funcions envoking
installCustom () {
installPackages
installConfigs
font
lsp
webdiv
}
echo "choose Installation type:"
echo "[ 1 ] full install"
echo "[ 2 ] custom install"
read -r insType
if [[ insType == "1" ]]; then
$((installAll))
elif [[ insType == "2" ]]; then
$((installCustom))
fi
}
installMethod
startNeovim