优化Harbor、Docker和Zsh安装流程,改进命令执行和文件操作
- 重构Harbor安装命令,改进容器检查和启动逻辑 - 修改Docker和DockerCompose安装方法,优化文件移动和权限设置 - 更新Zsh插件安装命令,简化git克隆过程 - 调整UnzipFile工具方法,支持更多压缩文件类型 - 修正Docker Daemon配置文件中的安装节标签 - 更新测试脚本,简化文件上传流程
This commit is contained in:
@@ -76,13 +76,13 @@ func addZshSubcommands(cmd *cobra.Command) {
|
||||
log.Info("安装zsh完成, 开始安装插件!")
|
||||
|
||||
pluginsHardCodeUrl := []string{
|
||||
"/usr/bin/git clone https://gitee.com/wangl-cc/zsh-autosuggestions.git /root/.oh-my-zsh/plugins/zsh-autosuggestions",
|
||||
"/usr/bin/git clone https://gitee.com/xiaoqqya/zsh-syntax-highlighting.git /root/.oh-my-zsh/plugins/zsh-syntax-highlighting",
|
||||
"https://gitee.com/wangl-cc/zsh-autosuggestions.git /root/.oh-my-zsh/plugins/zsh-autosuggestions",
|
||||
"https://gitee.com/xiaoqqya/zsh-syntax-highlighting.git /root/.oh-my-zsh/plugins/zsh-syntax-highlighting",
|
||||
}
|
||||
|
||||
pluginsHardCodeOutsideUrl := []string{
|
||||
"/usr/bin/git clone https://github.com/zsh-users/zsh-autosuggestions /root/.oh-my-zsh/plugins/zsh-autosuggestions",
|
||||
"/usr/bin/git clone https://github.com/zsh-users/zsh-syntax-highlighting.git /root/.oh-my-zsh/plugins/zsh-syntax-highlighting",
|
||||
"https://github.com/zsh-users/zsh-autosuggestions /root/.oh-my-zsh/plugins/zsh-autosuggestions",
|
||||
"https://github.com/zsh-users/zsh-syntax-highlighting.git /root/.oh-my-zsh/plugins/zsh-syntax-highlighting",
|
||||
}
|
||||
|
||||
pluginsListUrl := []string{
|
||||
@@ -104,13 +104,13 @@ func addZshSubcommands(cmd *cobra.Command) {
|
||||
if config.ConfigCache.Agent.Network.Internet == 7 {
|
||||
// 执行硬编码命令, 安装插件
|
||||
for _, command := range pluginsHardCodeUrl {
|
||||
op.HardCodeCommandExecutor(command)
|
||||
op.SingleLineCommandExecutor([]string{"git", "clone", command})
|
||||
}
|
||||
|
||||
} else {
|
||||
// 执行硬编码命令, 安装插件 国外
|
||||
for _, command := range pluginsHardCodeOutsideUrl {
|
||||
op.HardCodeCommandExecutor(command)
|
||||
op.SingleLineCommandExecutor([]string{"git", "clone", command})
|
||||
}
|
||||
}
|
||||
// 下载插件
|
||||
|
||||
Reference in New Issue
Block a user