mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-29 04:53:17 +02:00
More compatible way of checking if zsh is installed
This commit is contained in:
parent
9edb3fceba
commit
2832521585
1 changed files with 1 additions and 3 deletions
|
|
@ -24,12 +24,10 @@ main() {
|
||||||
# which may fail on systems lacking tput or terminfo
|
# which may fail on systems lacking tput or terminfo
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
CHECK_ZSH_INSTALLED=$(grep /zsh$ /etc/shells | wc -l)
|
if [ -z `which zsh` ]; then
|
||||||
if [ ! $CHECK_ZSH_INSTALLED -ge 1 ]; then
|
|
||||||
printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n"
|
printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
unset CHECK_ZSH_INSTALLED
|
|
||||||
|
|
||||||
if [ ! -n "$ZSH" ]; then
|
if [ ! -n "$ZSH" ]; then
|
||||||
ZSH=~/.oh-my-zsh
|
ZSH=~/.oh-my-zsh
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue