[init] 修改大量代码

This commit is contained in:
zeaslity
2023-10-20 14:10:20 +08:00
parent 3b30f5eee1
commit 7beab04895
8 changed files with 419 additions and 234 deletions

View File

@@ -54,7 +54,7 @@ install_demand_softwares() {
log "正在安装 ${software}..."
## 判断该软件是否安装成功
if ! $CMD_INSTALL "${software}"; then
if ! $cmd_install "${software}"; then
error "安装 ${software} 失败。"
error "如果是重要软件,本脚本会自动终止!!"
colorEchoPurple "一般软件,本脚本会忽略错误并继续运行,请之后手动安装该程序。"
@@ -186,7 +186,7 @@ EOF
# description
# Globals:
# BLUE
# CMD_REMOVE
# cmd_remove
# deploy_in_cn
# docker_version
# GREEN
@@ -210,7 +210,7 @@ install_docker() {
local pre_soft_ware=(docker-ce containerd.io docker-ce-cli docker-compose kubelet kubeadm kubectl)
local pre_one=""
for pre_one in ${pre_soft_ware[@]}; do
$CMD_REMOVE "$pre_one"
$cmd_remove "$pre_one"
done
colorEchoGreen "----------docker环境清理完成----------"
@@ -259,7 +259,7 @@ install_docker() {
else
log "开始安装相关的Docker基础组件"
install_demand_softwares apt-transport-https ca-certificates curl gnupg-agent software-properties-common lsb-release
install_demand_softwares apt-transport-https ca-certificates curl gnupg software-properties-common lsb-release
colorEchoGreen " 基础组件安装成功 "
echo ""
@@ -423,7 +423,7 @@ EOF
if [[ $deploy_in_cn -eq 1 ]]; then
log "开始从 Gitee 下载 自动补全 插件…………"
git clone https://gitee.com/githubClone/zsh-autosuggestions.git ~/.oh-my-zsh/plugins/zsh-autosuggestions
git clone https://gitee.com/wangl-cc/zsh-autosuggestions.git ~/.oh-my-zsh/plugins/zsh-autosuggestions
else
log "开始从 GitHub 下载 自动补全 插件…………"
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions
@@ -432,7 +432,7 @@ EOF
if [[ $deploy_in_cn -eq 1 ]]; then
log "开始从 Gitee 下载 命令高亮 插件…………"
git clone https://gitee.com/mo2/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins/zsh-syntax-highlighting
git clone https://gitee.com/xiaoqqya/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins/zsh-syntax-highlighting
else
log "开始从 GitHub 下载 命令高亮 插件…………"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins/zsh-syntax-highlighting