修改zsh判断方式
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user