From 7f4134a3acb757bba1adfc15e55971b53725f151 Mon Sep 17 00:00:00 2001 From: CodeWithEhtisham Date: Tue, 15 Aug 2023 16:06:21 +0500 Subject: [PATCH] syntax error near unexpected token `else' solve --- install.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 143d8b6..e8635f8 100755 --- a/install.sh +++ b/install.sh @@ -4,6 +4,7 @@ if [[ $EUID -ne 0 ]]; then echo "This script must be run as root" exit 1 fi + # Check dependencies if type curl &>/dev/null; then echo "" &>/dev/null @@ -54,7 +55,6 @@ if [ "$answer" == "Yes" ] || [ "$answer" == "yes" ] || [ "$answer" == "y" ] || [ read -p "Please enter your OpenAI API key: " key # Adding OpenAI key to shell profile - # zsh profile if [ -f ~/.zprofile ]; then echo "export OPENAI_KEY=$key" >>~/.zprofile if [[ ":$PATH:" != *":/usr/local/bin:"* ]]; then @@ -62,7 +62,6 @@ if [ "$answer" == "Yes" ] || [ "$answer" == "yes" ] || [ "$answer" == "y" ] || [ fi echo "OpenAI key and chatgpt path added to ~/.zprofile" source ~/.zprofile - # zshrc profile for debian elif [ -f ~/.zshrc ]; then echo "export OPENAI_KEY=$key" >>~/.zshrc if [[ ":$PATH:" == *":/usr/local/bin:"* ]]; then @@ -70,7 +69,6 @@ if [ "$answer" == "Yes" ] || [ "$answer" == "yes" ] || [ "$answer" == "y" ] || [ fi echo "OpenAI key and chatgpt path added to ~/.zshrc" source ~/.zshrc - # bash profile mac elif [ -f ~/.bash_profile ]; then echo "export OPENAI_KEY=$key" >>~/.bash_profile if [[ ":$PATH:" != *":/usr/local/bin:"* ]]; then @@ -78,7 +76,6 @@ if [ "$answer" == "Yes" ] || [ "$answer" == "yes" ] || [ "$answer" == "y" ] || [ fi echo "OpenAI key and chatgpt path added to ~/.bash_profile" source ~/.bash_profile - # profile ubuntu elif [ -f ~/.profile ]; then echo "export OPENAI_KEY=$key" >>~/.profile if [[ ":$PATH:" != *":/usr/local/bin:"* ]]; then