From c4981bae0a91ce6d4b0717558342584cc6491199 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sat, 5 May 2018 21:27:48 +0200 Subject: installer: check if zsh in path instead of /etc/shells Fixes #4955 Closes #5931 Closes #6398 Co-authored-by: Void Co-authored-by: Kaleb Elwert --- tools/install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 840a0d7d8..1a0a8e6db 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -24,12 +24,10 @@ main() { # which may fail on systems lacking tput or terminfo set -e - CHECK_ZSH_INSTALLED=$(grep /zsh$ /etc/shells | wc -l) - if [ ! $CHECK_ZSH_INSTALLED -ge 1 ]; then + if command -v zsh >/dev/null 2>&1; then printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n" exit fi - unset CHECK_ZSH_INSTALLED if [ ! -n "$ZSH" ]; then ZSH=~/.oh-my-zsh -- cgit v1.2.3-70-g09d2 From 8f0ff4bb63a8fd26741128a851c224af323eb772 Mon Sep 17 00:00:00 2001 From: ningwei1993 Date: Mon, 7 May 2018 06:39:28 +0800 Subject: fix bug for check zsh (#6798) --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 1a0a8e6db..ad47df785 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -24,7 +24,7 @@ main() { # which may fail on systems lacking tput or terminfo set -e - if command -v zsh >/dev/null 2>&1; then + if ! command -v zsh >/dev/null 2>&1; then printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n" exit fi -- cgit v1.2.3-70-g09d2 From 2b7a41b0d2e6a67ad14f94f7cc00293491f2c3f8 Mon Sep 17 00:00:00 2001 From: Gert de Pagter Date: Tue, 15 May 2018 11:26:59 +0200 Subject: Update the update prompt (#6825) `[Oh My Zsh] Would you like to check for updates? [Y/n]: ` does not make sense, since answering yes will download/apply the new updates instead of checking for them. --- tools/check_for_upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index a57f6da0f..b42b87750 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -42,7 +42,7 @@ if mkdir "$ZSH/log/update.lock" 2>/dev/null; then if [ "$DISABLE_UPDATE_PROMPT" = "true" ]; then _upgrade_zsh else - echo "[Oh My Zsh] Would you like to check for updates? [Y/n]: \c" + echo "[Oh My Zsh] Would you like to update? [Y/n]: \c" read line if [[ "$line" == Y* ]] || [[ "$line" == y* ]] || [ -z "$line" ]; then _upgrade_zsh -- cgit v1.2.3-70-g09d2