From a4f8d8dfb088eaf0c7f4eb0504a80db4da5c9409 Mon Sep 17 00:00:00 2001 From: lsy Date: Tue, 24 Sep 2024 18:08:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/User/key.sh | 4 ++-- Menus/Install.sh | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Config/User/key.sh b/Config/User/key.sh index c3cc39f..ac57d86 100644 --- a/Config/User/key.sh +++ b/Config/User/key.sh @@ -5,7 +5,7 @@ echo "2.安装密钥" echo "输入其他返回主页" declare pick echo "========key========" -read -p "请输入要选择的命令" pick +read -p "请输入要选择的命令:" pick case $pick in '1') @@ -38,7 +38,7 @@ case $pick in echo "选择错误" exit fi - type=${type_dick[$pick]} + type=${print_arr[$pick]} if [ ! -z ${type_dick[$type]} ]; then echo "请选择密钥位大小" diff --git a/Menus/Install.sh b/Menus/Install.sh index a09d8a8..98667ba 100644 --- a/Menus/Install.sh +++ b/Menus/Install.sh @@ -78,6 +78,10 @@ if [[ -e "${HOME}/.zshrc" ]];then echo "alias tool='$path/linuxtool/Run.sh'" | cat >> "${HOME}/.zshrc" source "${HOME}/.zshrc" &> /dev/null fi + +sed -i '/alias tool.*/d' "/etc/profile" +echo "alias tool='$path/linuxtool/Run.sh'" | cat >> "/etc/profile" + alias tool="$path/linuxtool/Run.sh" echo "工具箱已经安装成功"