mirror of
https://github.com/QSCTech/zjunet.git
synced 2026-01-22 03:34:48 +08:00
Compare commits
7 Commits
d601644df2
...
89810b80c9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89810b80c9 | ||
|
|
7bd9e67936 | ||
|
|
cfd6c16f60 | ||
|
|
9b7f791fd4 | ||
|
|
0e5b349cfb | ||
|
|
e46b04691a | ||
| 51240ecc87 |
23
.gitlab-ci.yml
Normal file
23
.gitlab-ci.yml
Normal file
@ -0,0 +1,23 @@
|
||||
image: ubuntu:jammy
|
||||
|
||||
stages:
|
||||
- build
|
||||
|
||||
compile:
|
||||
stage: build
|
||||
only:
|
||||
- tags
|
||||
script:
|
||||
- sed -i 's|http.*.ubuntu.com|http://mirrors.zju.edu.cn|' /etc/apt/sources.list
|
||||
- apt-get update && apt-get -y --no-install-recommends install ca-certificates build-essential fakeroot git dpkg-dev rpm python3 python-is-python3 python3-urllib3
|
||||
- mkdir artifacts
|
||||
- pushd build
|
||||
- ./build.sh
|
||||
- popd
|
||||
- cp build/debian/*.deb artifacts/
|
||||
- cp build/openwrt/*.opk artifacts/
|
||||
- cp build/rpm/*.rpm artifacts/
|
||||
artifacts:
|
||||
paths:
|
||||
- /artifacts
|
||||
|
||||
@ -36,7 +36,7 @@ If you meet any problem during or after the installation, check Troubleshooting
|
||||
2. Run these command.
|
||||
|
||||
``` bash
|
||||
curl https://mirrors.zju.edu.cn/openzjunet/zjumirrors.pgp | sudo apt-key add -
|
||||
curl https://mirrors.zju.edu.cn/openzjunet/zjumirrors.pgp | sudo tee /etc/apt/trusted.gpg.d/zjumirrors.asc
|
||||
curl https://mirrors.zju.edu.cn/openzjunet/zjunet.list | sudo tee /etc/apt/sources.list.d/zjunet.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install zjunet
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
2. 依次输入并执行下列命令:
|
||||
|
||||
``` bash
|
||||
curl https://mirrors.zju.edu.cn/openzjunet/zjumirrors.pgp | sudo apt-key add -
|
||||
curl https://mirrors.zju.edu.cn/openzjunet/zjumirrors.pgp | sudo tee /etc/apt/trusted.gpg.d/zjumirrors.asc
|
||||
curl https://mirrors.zju.edu.cn/openzjunet/zjunet.list | sudo tee /etc/apt/sources.list.d/zjunet.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install zjunet
|
||||
|
||||
@ -44,7 +44,7 @@ EOF
|
||||
|
||||
# dpkg-deb
|
||||
find ./debian -type d | xargs chmod 755
|
||||
fakeroot dpkg-deb --build debian
|
||||
fakeroot dpkg-deb -Zxz --build debian
|
||||
mv debian.deb zjunet_${VERSION}_all.deb
|
||||
|
||||
# remove debian/
|
||||
|
||||
@ -49,6 +49,7 @@ if [ "${devs_count}" -eq "0" ]; then
|
||||
ip_route_del 210.32.160.0/21
|
||||
ip_route_del 210.32.168.0/22
|
||||
ip_route_del 210.32.172.0/23
|
||||
ip_route_del 210.32.174.0/24
|
||||
ip_route_del 210.32.176.0/20
|
||||
ip_route_del 222.205.0.0/17
|
||||
ip_route_del 10.5.1.0/24
|
||||
@ -87,6 +88,7 @@ case "$gateway" in
|
||||
ip route replace 210.32.160.0/21 via $gateway
|
||||
ip route replace 210.32.168.0/22 via $gateway
|
||||
ip route replace 210.32.172.0/23 via $gateway
|
||||
ip route replace 210.32.174.0/24 via $gateway
|
||||
ip route replace 210.32.176.0/20 via $gateway
|
||||
ip route replace 222.205.0.0/17 via $gateway
|
||||
;;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user