From 5437f38bf7bf170164cfee93d626c7ccca1edb9f Mon Sep 17 00:00:00 2001 From: mcddx330 Date: Fri, 11 Oct 2024 14:17:35 +0900 Subject: [PATCH] replacement brew<->apt check macOS's "/usr/bin/apt" is stub file. So always failed. cf: https://discussions.apple.com/thread/252845493 --- run-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/run-install.sh b/run-install.sh index 24879824..32a72924 100644 --- a/run-install.sh +++ b/run-install.sh @@ -25,7 +25,10 @@ find_python() { # Function to install FFmpeg based on the distribution install_ffmpeg() { - if command -v apt > /dev/null; then + if command -v brew > /dev/null; then + log_message "Installing FFmpeg using Homebrew on macOS..." + brew install ffmpeg + elif command -v apt > /dev/null; then log_message "Installing FFmpeg using apt..." sudo apt update && sudo apt install -y ffmpeg elif command -v pacman > /dev/null; then @@ -34,9 +37,6 @@ install_ffmpeg() { elif command -v dnf > /dev/null; then log_message "Installing FFmpeg using dnf..." sudo dnf install -y ffmpeg --allowerasing || install_ffmpeg_flatpak - elif command -v brew > /dev/null; then - log_message "Installing FFmpeg using Homebrew on macOS..." - brew install ffmpeg else log_message "Unsupported distribution for FFmpeg installation. Trying Flatpak..." install_ffmpeg_flatpak