Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aandrew-me
GitHub Repository: aandrew-me/ytDownloader
Path: blob/main/mac.sh
448 views
1
#!/bin/bash
2
# >> Check if curl is installed or nor
3
if ! command -v curl > /dev/null 2>&1; then
4
echo "curl not installed, please install it and try again"
5
exit 1
6
fi
7
8
ARCH=$(uname -m)
9
mkdir -p ffmpeg/bin
10
11
if [ "$ARCH" = "arm64" ]; then
12
FF_URL="https://github.com/aandrew-me/ffmpeg-builds/releases/download/v8/ffmpeg_macos_arm64"
13
FP_URL="https://github.com/aandrew-me/ffmpeg-builds/releases/download/v8/ffprobe_macos_arm64"
14
elif [ "$ARCH" = "x86_64" ]; then
15
FF_URL="https://github.com/aandrew-me/ffmpeg-builds/releases/download/v8/ffmpeg_macos_amd64"
16
FP_URL="https://github.com/aandrew-me/ffmpeg-builds/releases/download/v8/ffprobe_macos_amd64"
17
else
18
echo "Unsupported architecture: $ARCH"
19
exit 1
20
fi
21
22
curl -L "$FF_URL" -o ffmpeg/bin/ffmpeg
23
curl -L "$FP_URL" -o ffmpeg/bin/ffprobe
24
chmod +x ffmpeg/bin/ffmpeg
25
chmod +x ffmpeg/bin/ffprobe
26
27