From 1f0f85168dec2d0ae3fa89a9c2a02458484af028 Mon Sep 17 00:00:00 2001 From: Han Bui Date: Thu, 22 Aug 2024 14:16:36 +0200 Subject: [PATCH] Add information messsage for macOS users about PATH configuration + Require bash version 4 and higher to avoid syntax errors --- docs/source/_static/install_dependencies.sh | 6 ++++++ docs/source/_static/install_depthai.sh | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/docs/source/_static/install_dependencies.sh b/docs/source/_static/install_dependencies.sh index d635153b8..762950ffd 100755 --- a/docs/source/_static/install_dependencies.sh +++ b/docs/source/_static/install_dependencies.sh @@ -117,6 +117,12 @@ readonly fedora_pkgs=( # libsm6 libxext6 libgl1-mesa-glx ) +# Check Bash version +if [[ "${BASH_VERSINFO:-0}" -lt 4 ]]; then + echo "This script requires Bash 4.0 or higher. You are using Bash ${BASH_VERSION}. Please upgrade your Bash version." + exit 1 +fi + print_action () { green="\e[0;32m" reset="\e[0;0m" diff --git a/docs/source/_static/install_depthai.sh b/docs/source/_static/install_depthai.sh index f38c67749..d3270ff08 100755 --- a/docs/source/_static/install_depthai.sh +++ b/docs/source/_static/install_depthai.sh @@ -159,6 +159,11 @@ if [[ $(uname -s) == "Darwin" ]]; then pip install pyqt5 pip install packaging + # Inform macOS users about PATH changes + echo "DepthAI has been added to your PATH in .bashrc and .zshrc (if present)." + echo "If you prefer, you can manually add the following line to your .bash_profile for it to be recognized in login shells:" + echo "export PATH=\$PATH:$ENTRYPOINT_DIR" + elif [[ $(uname -s) == "Linux" ]]; then echo _____________________________ echo "Calling linux_installer.sh"