From fa6cfe04b0db5030b38f18a8aeff9347fc9357c6 Mon Sep 17 00:00:00 2001 From: zeaslity Date: Wed, 18 Oct 2023 16:13:36 +0800 Subject: [PATCH] =?UTF-8?q?[=20Agent=20]=20[=20Executor=20]=20-=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9zsh=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent-go/executor/BaseFunction.go | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/agent-go/executor/BaseFunction.go b/agent-go/executor/BaseFunction.go index 2c63f0d..2477351 100644 --- a/agent-go/executor/BaseFunction.go +++ b/agent-go/executor/BaseFunction.go @@ -745,10 +745,11 @@ func (op *AgentOsOperator) installDockerComposeExec() (bool, []string) { log.InfoF("需要安装的docker版本为 => %s", DockerComposeFile) ok, resultLog := AllCommandExecutor([]string{ - "wget", - "--timeout=10", + "curl", + "--connect-timeout", + "10", DockerComposeFile, - "-O", + "-o", "/usr/local/bin/docker-compose", }) if !ok { @@ -1151,13 +1152,13 @@ func (op *AgentOsOperator) installZSH() [][]string { { "git", "clone", - "https://github.com.cnpmjs.org/zsh-users/zsh-autosuggestions", + "https://github.com/zsh-users/zsh-autosuggestions", "~/.oh-my-zsh/plugins/zsh-autosuggestions", }, { "git", "clone", - "https://github.com.cnpmjs.org/zsh-users/zsh-syntax-highlighting.git", + "https://github.com/zsh-users/zsh-syntax-highlighting.git", "~/.oh-my-zsh/plugins/zsh-syntax-highlighting", }, { @@ -1267,31 +1268,38 @@ func (op *AgentOsOperator) installZSHExec() (bool, []string) { } log.Info("zsh安装完成! 开始进行zsh的配置!") + zshAutoSourcePath := "https://github.com/zsh-users/zsh-autosuggestions" + zshHighLightingSourcePath := "https://github.com/zsh-users/zsh-syntax-highlighting.git" + if op.IsAgentInnerWall { + zshAutoSourcePath = "https://gitee.com/wangl-cc/zsh-autosuggestions.git" + zshHighLightingSourcePath = "https://gitee.com/xiaoqqya/zsh-syntax-highlighting.git" + } + modifyZSHOK, log3 := AllCompleteExecutor( [][]string{ { "git", "clone", - "https://github.com.cnpmjs.org/zsh-users/zsh-autosuggestions", + zshAutoSourcePath, "~/.oh-my-zsh/plugins/zsh-autosuggestions", }, { "git", "clone", - "https://github.com.cnpmjs.org/zsh-users/zsh-syntax-highlighting.git", + zshHighLightingSourcePath, "~/.oh-my-zsh/plugins/zsh-syntax-highlighting", }, { "wget", op.OssOfflinePrefix + "oh-my-zsh-plugins-list.txt", "-O", - "oh-my-zsh-plugins-list.txt", + "/root/wdd/oh-my-zsh-plugins-list.txt", }, { "wget", "-c", "-i", - "./oh-my-zsh-plugins-list.txt", + "/root/wdd/oh-my-zsh-plugins-list.txt", "-P", "~/.oh-my-zsh/plugins/", },