From 043e8ac1fa1a5d9894b84f8890a41363b909a01a Mon Sep 17 00:00:00 2001 From: jscampucci Date: Fri, 11 Oct 2024 10:00:25 +0200 Subject: [PATCH] [clean] macos install --- macos/notube-macos-install.sh | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/macos/notube-macos-install.sh b/macos/notube-macos-install.sh index f083c1b..278603a 100644 --- a/macos/notube-macos-install.sh +++ b/macos/notube-macos-install.sh @@ -1,5 +1,31 @@ -#!/bin/sh +#!/bin/bash -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -brew install ffmpeg -brew install yt-dlp \ No newline at end of file +# 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)" +else + echo "Homebrew is already installed." +fi + +echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.bash_profile && source ~/.bash_profile + + +# Install FFmpeg +if ! command -v ffmpeg &> /dev/null +then + echo "FFmpeg not found. Installing FFmpeg..." + brew install ffmpeg +else + echo "FFmpeg is already installed." +fi + +# Install yt-dlp +if ! command -v yt-dlp &> /dev/null +then + echo "yt-dlp not found. Installing yt-dlp..." + brew install yt-dlp +else + echo "yt-dlp is already installed." +fi \ No newline at end of file