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