[ Agent ] [ Executor ] - 修改zsh部分

This commit is contained in:
zeaslity
2023-10-18 16:13:36 +08:00
parent b675cf3340
commit fa6cfe04b0

View File

@@ -745,10 +745,11 @@ func (op *AgentOsOperator) installDockerComposeExec() (bool, []string) {
log.InfoF("需要安装的docker版本为 => %s", DockerComposeFile) log.InfoF("需要安装的docker版本为 => %s", DockerComposeFile)
ok, resultLog := AllCommandExecutor([]string{ ok, resultLog := AllCommandExecutor([]string{
"wget", "curl",
"--timeout=10", "--connect-timeout",
"10",
DockerComposeFile, DockerComposeFile,
"-O", "-o",
"/usr/local/bin/docker-compose", "/usr/local/bin/docker-compose",
}) })
if !ok { if !ok {
@@ -1151,13 +1152,13 @@ func (op *AgentOsOperator) installZSH() [][]string {
{ {
"git", "git",
"clone", "clone",
"https://github.com.cnpmjs.org/zsh-users/zsh-autosuggestions", "https://github.com/zsh-users/zsh-autosuggestions",
"~/.oh-my-zsh/plugins/zsh-autosuggestions", "~/.oh-my-zsh/plugins/zsh-autosuggestions",
}, },
{ {
"git", "git",
"clone", "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", "~/.oh-my-zsh/plugins/zsh-syntax-highlighting",
}, },
{ {
@@ -1267,31 +1268,38 @@ func (op *AgentOsOperator) installZSHExec() (bool, []string) {
} }
log.Info("zsh安装完成! 开始进行zsh的配置!") 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( modifyZSHOK, log3 := AllCompleteExecutor(
[][]string{ [][]string{
{ {
"git", "git",
"clone", "clone",
"https://github.com.cnpmjs.org/zsh-users/zsh-autosuggestions", zshAutoSourcePath,
"~/.oh-my-zsh/plugins/zsh-autosuggestions", "~/.oh-my-zsh/plugins/zsh-autosuggestions",
}, },
{ {
"git", "git",
"clone", "clone",
"https://github.com.cnpmjs.org/zsh-users/zsh-syntax-highlighting.git", zshHighLightingSourcePath,
"~/.oh-my-zsh/plugins/zsh-syntax-highlighting", "~/.oh-my-zsh/plugins/zsh-syntax-highlighting",
}, },
{ {
"wget", "wget",
op.OssOfflinePrefix + "oh-my-zsh-plugins-list.txt", op.OssOfflinePrefix + "oh-my-zsh-plugins-list.txt",
"-O", "-O",
"oh-my-zsh-plugins-list.txt", "/root/wdd/oh-my-zsh-plugins-list.txt",
}, },
{ {
"wget", "wget",
"-c", "-c",
"-i", "-i",
"./oh-my-zsh-plugins-list.txt", "/root/wdd/oh-my-zsh-plugins-list.txt",
"-P", "-P",
"~/.oh-my-zsh/plugins/", "~/.oh-my-zsh/plugins/",
}, },