Enhance Docker Installation and Management Commands
- Improved Docker installation process for Ubuntu systems - Added support for dynamic Docker version detection - Enhanced Docker local and online installation commands - Implemented more robust Docker removal functionality - Updated Docker installation to use system-specific package sources - Added better error handling and logging for Docker operations - Refined Docker service startup and configuration checks
This commit is contained in:
@@ -76,13 +76,13 @@ func addZshSubcommands(cmd *cobra.Command) {
|
||||
log.Info("安装zsh完成, 开始安装插件!")
|
||||
|
||||
pluginsHardCodeUrl := []string{
|
||||
"git clone https://gitee.com/wangl-cc/zsh-autosuggestions.git ~/.oh-my-zsh/plugins/zsh-autosuggestions",
|
||||
"git clone https://gitee.com/xiaoqqya/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins/zsh-syntax-highlighting",
|
||||
"git clone https://gitee.com/wangl-cc/zsh-autosuggestions.git /root/.oh-my-zsh/plugins/zsh-autosuggestions",
|
||||
"git clone https://gitee.com/xiaoqqya/zsh-syntax-highlighting.git /root/.oh-my-zsh/plugins/zsh-syntax-highlighting",
|
||||
}
|
||||
|
||||
pluginsHardCodeOutsideUrl := []string{
|
||||
"git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions",
|
||||
"git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins/zsh-syntax-highlighting",
|
||||
"git clone https://github.com/zsh-users/zsh-autosuggestions /root/.oh-my-zsh/plugins/zsh-autosuggestions",
|
||||
"git clone https://github.com/zsh-users/zsh-syntax-highlighting.git /root/.oh-my-zsh/plugins/zsh-syntax-highlighting",
|
||||
}
|
||||
|
||||
pluginsListUrl := []string{
|
||||
@@ -122,9 +122,9 @@ func addZshSubcommands(cmd *cobra.Command) {
|
||||
}
|
||||
|
||||
// 修改ZSH配置
|
||||
utils.FindAndReplaceContentInFile("/root/.zshrc", "robbyrussell", "agnoster")
|
||||
utils.FindAndReplaceContentInFile("/root/.zshrc", "# DISABLE_AUTO_UPDATE=\"true\"", "DISABLE_AUTO_UPDATE=\"true\"")
|
||||
utils.FindAndReplaceContentInFile("/root/.zshrc", "plugins=(git)", "plugins=(git zsh-autosuggestions zsh-syntax-highlighting command-not-found z themes)")
|
||||
utils.FindAndReplaceContentInFile("robbyrussell", "agnoster", "/root/.zshrc")
|
||||
utils.FindAndReplaceContentInFile("# DISABLE_AUTO_UPDATE=\"true\"", "DISABLE_AUTO_UPDATE=\"true\"", "/root/.zshrc")
|
||||
utils.FindAndReplaceContentInFile("plugins=(git)", "plugins=(git zsh-autosuggestions zsh-syntax-highlighting command-not-found z themes)", "/root/.zshrc")
|
||||
|
||||
//
|
||||
op.SingleLineCommandExecutor([]string{
|
||||
|
||||
Reference in New Issue
Block a user