-
Notifications
You must be signed in to change notification settings - Fork 1
/
Install
157 lines (154 loc) · 2.69 KB
/
Install
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
#!/bin/bash
black="\e[30m"
red="\033[31m"
green="\033[32m"
yellow="\033[33m"
blue="\033[34m"
purple="\033[35m"
cyan="\033[36m"
white="\033[37m"
background="\033[0m"
function ErrorReturn(){
echo -en "
${white}————————————————————
脚本运行出现${red}错误$white,请及时${blue}截图${white},保存报错信息,
以与便开发者,${green}更好的${white}和${green}更快的${cyan}解决${white}问题.
${white}————————————————————${background}"
read
return 1
}
function Universal(){
if ! bash ../Linux/NodeJS
then
ErrorReturn
fi
if ! bash ../Linux/FFmpeg
then
ErrorReturn
fi
if ! bash ../Linux/Fonts
then
ErrorReturn
fi
}
if grep -i -q "Ubuntu" /etc/os-release
then
if ! bash ../Linux/Ubuntu
then
ErrorReturn
fi
Universal
elif grep -i -q "Debian" /etc/os-release
then
if ! bash ../Linux/Debian
then
ErrorReturn
fi
Universal
elif grep -i -q "CentOS" /etc/os-release
then
if ! bash ../Linux/CentOS
then
ErrorReturn
fi
Universal
elif grep -i -q "Arch" /etc/os-release
then
if ! bash ../Linux/Arch
then
ErrorReturn
fi
Universal
elif grep -i -q "Kali" /etc/os-release
then
if ! bash ../Linux/Kali
then
ErrorReturn
fi
Universal
elif grep -i -q "Alpine" /etc/os-release
then
if ! bash ../Linux/Alpine
then
ErrorReturn
fi
elif grep -i -q "Manjaro" /etc/os-release
then
if ! bash ../Linux/Manjaro
then
ErrorReturn
fi
else
echo -e ${red}暂时不受支持的发行版${background}
exit 1
fi
function a(){
if grep -i -q "Ubuntu" /etc/os-release
then
if ! bash ../Linux/Ubuntu
then
ErrorReturn
fi
if ! bash ../Linux/Ubuntu
then
ErrorReturn
fi
elif grep -i -q "Debian" /etc/os-release
then
if ! bash ../Linux/Debian
then
ErrorReturn
fi
elif grep -i -q "CentOS" /etc/os-release
then
if ! bash ../Linux/CentOS
then
ErrorReturn
fi
elif grep -i -q "Arch" /etc/os-release
then
if ! bash ../Linux/Arch
then
ErrorReturn
fi
elif grep -i -q "Manjaro" /etc/os-release
then
if ! bash ../Linux/Manjaro
then
ErrorReturn
fi
elif grep -i -q "openSUSE" /etc/os-release
then
if ! bash ../Linux/openSUSE
then
ErrorReturn
fi
elif grep -i -q "Fedora" /etc/os-release
then
if ! bash ../Linux/Fedora
then
ErrorReturn
fi
elif grep -i -q "Kali" /etc/os-release
then
if ! bash ../Linux/Kali
then
ErrorReturn
fi
elif grep -i -q "Alpine" /etc/os-release
then
if ! bash ../Linux/Alpine
then
ErrorReturn
fi
elif grep -i -q "MSYS2" /etc/os-release
then
if ! bash ../Linux/MSYS2
then
ErrorReturn
fi
else
echo -e ${red}不受支持的发行版${background}
exit 1
fi
}