Skip to content

Commit

Permalink
replacement brew<->apt check
Browse files Browse the repository at this point in the history
macOS's "/usr/bin/apt" is stub file. So always failed.
cf: https://discussions.apple.com/thread/252845493
  • Loading branch information
mcddx330 authored Oct 11, 2024
1 parent 8e02e1c commit 5437f38
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions run-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5437f38

Please sign in to comment.