mirror of
https://github.com/bin456789/reinstall.git
synced 2025-06-23 20:59:51 +00:00
core: 国内使用 gitee
This commit is contained in:
parent
51a630f1b9
commit
111fcb00e0
@ -19,7 +19,7 @@
|
|||||||
curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh
|
curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh
|
||||||
|
|
||||||
### 下载 (国内):
|
### 下载 (国内):
|
||||||
curl -O https://ghproxy.com/https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh
|
curl -O https://gitee.com/bin456789/reinstall/raw/main/reinstall.sh
|
||||||
|
|
||||||
### 安装 Linux:
|
### 安装 Linux:
|
||||||
bash reinstall.sh centos 7|8|9 (8|9 为 stream 版本)
|
bash reinstall.sh centos 7|8|9 (8|9 为 stream 版本)
|
||||||
|
17
reinstall.sh
17
reinstall.sh
@ -116,16 +116,6 @@ get_host_by_url() {
|
|||||||
cut -d/ -f3 <<<$1
|
cut -d/ -f3 <<<$1
|
||||||
}
|
}
|
||||||
|
|
||||||
set_github_proxy() {
|
|
||||||
case "$confhome" in
|
|
||||||
http*://raw.githubusercontent.com/*)
|
|
||||||
if is_in_china; then
|
|
||||||
confhome=https://ghproxy.com/$confhome
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
test_url() {
|
test_url() {
|
||||||
url=$1
|
url=$1
|
||||||
expect_type=$2
|
expect_type=$2
|
||||||
@ -845,8 +835,11 @@ case "$basearch" in
|
|||||||
"aarch64") basearch_alt=arm64 ;;
|
"aarch64") basearch_alt=arm64 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# 设置 github 国内代理
|
# 国内使用 gitee
|
||||||
set_github_proxy
|
if [ "$confhome" = https://raw.githubusercontent.com/bin456789/reinstall/main ] &&
|
||||||
|
is_in_china; then
|
||||||
|
confhome=https://gitee.com/bin456789/reinstall/raw/main
|
||||||
|
fi
|
||||||
|
|
||||||
# 以下目标系统不需要进入alpine
|
# 以下目标系统不需要进入alpine
|
||||||
# debian
|
# debian
|
||||||
|
Loading…
x
Reference in New Issue
Block a user