[ 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)
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/",
},