Spaces:
Running
Running
Update entrypoint.sh
Browse files- entrypoint.sh +11 -1
entrypoint.sh
CHANGED
@@ -8,9 +8,19 @@ run_script() {
|
|
8 |
# 设置代理
|
9 |
export https_proxy=$PROXY http_proxy=$PROXY all_proxy=$PROXY
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
# 运行代码
|
12 |
echo "运行 collect.py"
|
13 |
-
python -u subscribe/collect.py -si
|
14 |
|
15 |
echo "运行 merged2upload.py"
|
16 |
python /app/merged2upload.py
|
|
|
8 |
# 设置代理
|
9 |
export https_proxy=$PROXY http_proxy=$PROXY all_proxy=$PROXY
|
10 |
|
11 |
+
# 检查 aggregator 目录是否存在,如果不存在则克隆
|
12 |
+
if [ ! -d "/app/aggregator" ]; then
|
13 |
+
echo "克隆 aggregator 仓库"
|
14 |
+
if [ "${GIT_CLONE_PROXY}" = "1" ]; then
|
15 |
+
git clone https://mirror.ghproxy.com/https://github.com/wzdnzd/aggregator.git /app/aggregator
|
16 |
+
else
|
17 |
+
git clone https://github.com/wzdnzd/aggregator.git /app/aggregator
|
18 |
+
fi
|
19 |
+
fi
|
20 |
+
|
21 |
# 运行代码
|
22 |
echo "运行 collect.py"
|
23 |
+
python -u /app/aggregator/subscribe/collect.py -si
|
24 |
|
25 |
echo "运行 merged2upload.py"
|
26 |
python /app/merged2upload.py
|