From 88d94c0f50e28f5c53e291673ebcb7eee97723be Mon Sep 17 00:00:00 2001 From: Aquib Date: Thu, 29 Jun 2023 13:45:25 +0530 Subject: [PATCH 1/2] Add command to configure shell in Linux and MacOS --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7521eaa..e1b7696 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,25 @@ brew install assemblyai If you don't have Homebrew installed, or are running Linux: ```bash -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/install.sh)" +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/install.sh)" && + +case "$SHELL" in + *bash*) + if [ -f "$HOME/.bashrc" ]; then + # if the shell contains "bash" and .bashrc is present + source $HOME/.bashrc + fi + ;; + *zsh*) + if [ -f "$HOME/.zshrc" ]; then + # if the shell contains "zsh" and .zshrc is present + source $HOME/.zshrc + fi + ;; + *) + echo "Unknown shell or required configuration file not found." + ;; +esac ``` ### Windows From 9aa8afd4392b3bcf75d21e597e9906793275a4a6 Mon Sep 17 00:00:00 2001 From: Aquib Date: Thu, 29 Jun 2023 17:35:04 +0530 Subject: [PATCH 2/2] Remove chaining and put loading in a seperate command --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e1b7696..844fd07 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,10 @@ brew install assemblyai If you don't have Homebrew installed, or are running Linux: ```bash -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/install.sh)" && - +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/install.sh)" +``` +Load the shell configuration file +```bash case "$SHELL" in *bash*) if [ -f "$HOME/.bashrc" ]; then