#!/bin/bash
cd /www/wwwroot/labhub.sddts.cn/

wget -O ishare2 https://raw.githubusercontent.com/ishare2-org/ishare2-cli/alpha/ishare2
sed -i 's#https://raw.githubusercontent.com/ishare2-org/mirrors/main/index.gd.json#https://labhub.sddts.cn/index.gd.json#g' ishare2
sed -i 's#https://raw.githubusercontent.com/ishare2-org/ishare2-cli/$CHANNEL/sources.list#https://labhub.sddts.cn/sources.list#' ishare2

wget https://raw.githubusercontent.com/ishare2-org/mirrors/main/index.gd.json -O index.gd.json
sed -i 's#https://drive.labhub.eu.org/0:#https://vip.123pan.cn/1815238395/UNETLAB%20I#g' index.gd.json
sed -i 's#https://drive.labhub.eu.org/1:#https://vip.123pan.cn/1815238395/UNETLAB%20II#g' index.gd.json

wget -O sources.list https://raw.githubusercontent.com/ishare2-org/ishare2-cli/alpha/sources.list
sed -i 's#https://raw.githubusercontent.com/#https://ghproxy.sddts.cn/https://raw.githubusercontent.com/#' sources.list
sed -i 's#https://labhub.eu.org/api/raw/?path=#https://vip.123pan.cn/1815238395#' sources.list

