mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 14:56:07 +08:00
修复获取更新分支
This commit is contained in:
parent
591ef9781c
commit
5886e78299
|
@ -247,14 +247,14 @@ usage() {
|
||||||
## 更新qinglong
|
## 更新qinglong
|
||||||
update_qinglong() {
|
update_qinglong() {
|
||||||
local mirror="github"
|
local mirror="github"
|
||||||
local githubStatus=$(curl -s -m 3 -IL "https://github.com" | grep 200)
|
local githubStatus=$(curl -s -m 2 -IL "https://github.com" | grep 200)
|
||||||
if [ "$githubStatus" == "" ]; then
|
if [ "$githubStatus" == "" ]; then
|
||||||
mirror="gitee"
|
mirror="gitee"
|
||||||
fi
|
fi
|
||||||
echo -e "\n使用 ${mirror} 源更新...\n"
|
echo -e "\n使用 ${mirror} 源更新...\n"
|
||||||
export isFirstStartServer=false
|
export isFirstStartServer=false
|
||||||
|
|
||||||
local all_branch=$(git branch -a)
|
local all_branch=$(cd ${dir_root} && git branch -a)
|
||||||
local primary_branch="master"
|
local primary_branch="master"
|
||||||
if [[ "${all_branch}" =~ "${current_branch}" ]]; then
|
if [[ "${all_branch}" =~ "${current_branch}" ]]; then
|
||||||
primary_branch="${current_branch}"
|
primary_branch="${current_branch}"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user