From d985a821b93fc827b16a01ce7459a868e5f47eea Mon Sep 17 00:00:00 2001 From: Max Zhao Date: Thu, 25 Jan 2024 02:13:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9`zsh`=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/init.sh b/scripts/init.sh index a86da9d..ee27862 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -215,7 +215,7 @@ if [ -n "$profile" ];then echo "export CRASHDIR=\"$CRASHDIR\"" >> $profile #设置路径环境变量 source $profile &>/dev/null || echo 运行错误!请使用bash而不是dash运行安装命令!!! #适配zsh环境变量 - [ -n "$(ls -l /bin/sh|grep -oE 'zsh')" ] && [ -z "$(cat ~/.zshrc 2>/dev/null|grep CRASHDIR)" ] && { + [ -n "$(cat /etc/shells|grep -oE 'zsh')" ] && [ -z "$(cat ~/.zshrc 2>/dev/null|grep CRASHDIR)" ] && { echo "alias crash=\"$shtype $CRASHDIR/menu.sh\"" >> ~/.zshrc echo "export CRASHDIR=\"$CRASHDIR\"" >> ~/.zshrc source ~/.zshrc &>/dev/null