From 4fec0a46e73479cf3b9e7f953750af5ed5df87ac Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 17 Apr 2018 22:14:23 +0200 Subject: [installer] use `command -v` to check for git Quick fix to the script not finding git due to hash. Solves #6697. --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/install.sh') diff --git a/tools/install.sh b/tools/install.sh index 187c828f5..840a0d7d8 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -49,7 +49,7 @@ main() { umask g-w,o-w printf "${BLUE}Cloning Oh My Zsh...${NORMAL}\n" - hash git >/dev/null 2>&1 || { + command -v git >/dev/null 2>&1 || { echo "Error: git is not installed" exit 1 } -- cgit v1.2.3-70-g09d2 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/install.sh') 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/install.sh') 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 fec0089cddf4eb6677d90561079f7a6cb0971197 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Wed, 13 Jun 2018 01:02:48 +0100 Subject: Quote $ZSH where necessary in install script (#6587) Quote $ZSH where necessary in install script --- tools/install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/install.sh') diff --git a/tools/install.sh b/tools/install.sh index ad47df785..b815a9c81 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -59,7 +59,7 @@ main() { exit 1 fi fi - env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git $ZSH || { + env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git "$ZSH" || { printf "Error: git clone of oh-my-zsh repo failed\n" exit 1 } @@ -72,9 +72,9 @@ main() { fi printf "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc${NORMAL}\n" - cp $ZSH/templates/zshrc.zsh-template ~/.zshrc + cp "$ZSH"/templates/zshrc.zsh-template ~/.zshrc sed "/^export ZSH=/ c\\ - export ZSH=$ZSH + export ZSH=\"$ZSH\" " ~/.zshrc > ~/.zshrc-omztemp mv -f ~/.zshrc-omztemp ~/.zshrc -- cgit v1.2.3-70-g09d2 From 8f95637e6772a1156a29d9c6a9c21ea8d7316a12 Mon Sep 17 00:00:00 2001 From: Joel Kuzmarski Date: Sun, 1 Jul 2018 11:39:30 -0500 Subject: Login shell after install (#5314) Otherwise these files are not sourced: 1. /etc/zprofile 2. ~/.zprofile 3. /etc/zlogin 4. ~/.zlogin 5. ~/.zlogout 6. /etc/zlogout --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/install.sh') diff --git a/tools/install.sh b/tools/install.sh index b815a9c81..0cc020053 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -108,7 +108,7 @@ main() { echo 'p.p.s. Get stickers and t-shirts at https://shop.planetargon.com.' echo '' printf "${NORMAL}" - env zsh + env zsh -l } main -- cgit v1.2.3-70-g09d2