diff --git a/scripts/linux_install.sh b/scripts/linux_install.sh old mode 100644 new mode 100755 index 7fe6efa..8b50419 --- a/scripts/linux_install.sh +++ b/scripts/linux_install.sh @@ -2,23 +2,34 @@ echo "Starting installation for Linux..." +set -e # Update package list -sudo apt-get update +sudo apt-get update || { echo "Failed to update package list"; exit 1; } # make sure essential tool are installed -sudo apt install python3-dev python3-pip python3-wheel build-essential alsa-utils +# Install essential tools +sudo apt-get install -y \ + python3-dev \ + python3-pip \ + python3-wheel \ + build-essential \ + alsa-utils \ + portaudio19-dev \ + python3-pyaudio \ + libgtk-3-dev \ + libnotify-dev \ + libgconf-2-4 \ + libnss3 \ + libxss1 || { echo "Failed to install packages"; exit 1; } + # upgrade pip pip install --upgrade pip -# install port audio -sudo apt-get install portaudio19-dev python-pyaudio python3-pyaudio -# install chromedriver misc -sudo apt install libgtk-3-dev libnotify-dev libgconf-2-4 libnss3 libxss1 # install wheel pip install --upgrade pip setuptools wheel # install docker compose -sudo apt install docker-compose -# Install Python dependencies from requirements.txt -pip3 install --no-cache-dir --force-reinstall -r requirements.txt +sudo apt install -y docker-compose # Install Selenium for chromedriver pip3 install selenium +# Install Python dependencies from requirements.txt +pip3 install -r requirements.txt echo "Installation complete for Linux!" \ No newline at end of file diff --git a/scripts/macos_install.sh b/scripts/macos_install.sh old mode 100644 new mode 100755 index 5e648c2..933ebb1 --- a/scripts/macos_install.sh +++ b/scripts/macos_install.sh @@ -2,19 +2,27 @@ echo "Starting installation for macOS..." +set -e + +# Check if homebrew is installed +if ! command -v brew &> /dev/null; then + echo "Homebrew not found. Installing Homebrew..." + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +fi + +# update +brew update +# make sure wget installed +brew install wget +# Install chromedriver using Homebrew +brew install --cask chromedriver +# Install portaudio for pyAudio using Homebrew +brew install portaudio +# update pip +python3 -m pip install --upgrade pip +# Install Selenium +pip3 install selenium # Install Python dependencies from requirements.txt pip3 install -r requirements.txt -# make sure wget installed -brew install wget - -# Install chromedriver using Homebrew -brew install --cask chromedriver - -# Install portaudio for pyAudio using Homebrew -brew install portaudio - -# Install Selenium -pip3 install selenium - echo "Installation complete for macOS!" \ No newline at end of file diff --git a/scripts/windows_install.bat b/scripts/windows_install.bat old mode 100644 new mode 100755