-
Notifications
You must be signed in to change notification settings - Fork 70
/
QLOneKeyDependency.sh
103 lines (72 loc) · 1.93 KB
/
QLOneKeyDependency.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
#!/usr/bin/env bash
#
# 青龙一键安装脚本[原作者FlechazoPh,翔翎修改]
# 原作者GitHub仓库: https://github.com/FlechazoPh/QLDependency
#
# 安装报错,请提交Issue
# 有其他需要的依赖,欢迎到源仓库提交Pull Request
TIME() {
[[ -z "$1" ]] && {
echo -ne " "
} || {
case $1 in
r) export Color="\e[31;1m";;
g) export Color="\e[32;1m";;
b) export Color="\e[34;1m";;
y) export Color="\e[33;1m";;
z) export Color="\e[35;1m";;
l) export Color="\e[36;1m";;
esac
[[ $# -lt 2 ]] && echo -e "\e[36m\e[0m ${1}" || {
echo -e "\e[36m\e[0m ${Color}${2}\e[0m"
}
}
}
echo
echo
echo
TIME r "本脚本基于FlechazoPh大佬脚本修改而来,感谢FlechazoPh的贡献·····"
TIME l "安装依赖..."
echo
TIME y "安装依赖需要时间,请耐心等待!"
echo
sleep 3
echo
echo
echo "当前node版本(如果没有node,请自行安装): "
npm -v
echo "当前npm版本(如果没有npm,请自行安装): "
npm -v
cd /ql
pnpm add -g pnpm
pnpm install -g
npm install -g npm
npm install -g png-js
npm install -g date-fns
npm install -g axios
npm install -g crypto-js
npm install -g ts-md5
npm install -g tslib
npm install -g @types/node
npm install -g requests
npm install -g tough-cookie
npm install -g jsdom
npm install -g download
npm install -g tunnel
npm install -g fs
npm install -g ws
npm install -g form-data
pnpm install -g js-base64
pnpm install -g qrcode-terminal
pnpm install -g silly-datetime
pip3 install requests
cd /ql/scripts/ && apk add --no-cache build-base g++ cairo-dev pango-dev giflib-dev && npm i && npm i -S ts-node typescript @types/node date-fns axios png-js canvas --build-from-source
cd /ql
apk add --no-cache build-base g++ cairo-dev pango-dev giflib-dev && cd scripts && npm install canvas --build-from-source
cd /ql
apk add python3 zlib-dev gcc jpeg-dev python3-dev musl-dev freetype-dev
echo
TIME g "依赖安装完毕...建议重启 Docker "
echo
echo
exit 0