@@ -64,14 +64,14 @@ check_git() {
64
64
# check for git (why would you not have git??)
65
65
if ! cmd_exists git || [[ $FORCE -eq 1 ]]; then
66
66
ech " Git not found. Installing git..."
67
- if cmd_exists pkg ; then ech " Using: pkg "
68
- pkg install git
67
+ if cmd_exists brew ; then ech " Using: brew "
68
+ brew install git
69
69
elif cmd_exists dnf; then ech " Using: dnf"
70
70
sudo dnf install git
71
71
elif cmd_exists apt && ! [[ " $ostype " == " darwin" * ]]; then ech " Using: apt"
72
72
sudo apt install git
73
- elif cmd_exists brew ; then ech " Using: brew "
74
- brew install git
73
+ elif cmd_exists pkg ; then ech " Using: pkg "
74
+ pkg install git
75
75
elif cmd_exists port; then ech " Using: MacPorts/DarwinPorts"
76
76
sudo port install git
77
77
else
@@ -90,10 +90,10 @@ check_yt_dlp() {
90
90
ech " Installing yt-dlp..."
91
91
if [[ " $method " == " linux" ]]; then
92
92
fdown=0
93
- if cmd_exists apt && ! [[ " $ostype " == " darwin" * ]]; then ech " Using: apt"
94
- sudo apt install yt-dlp
95
- elif cmd_exists brew; then ech " Using: brew"
93
+ if cmd_exists brew; then ech " Using: brew"
96
94
brew install yt-dlp
95
+ elif cmd_exists apt && ! [[ " $ostype " == " darwin" * ]]; then ech " Using: apt"
96
+ sudo apt install yt-dlp
97
97
elif cmd_exists curl; then ech " Using: curl (file download)" ; fdown=1
98
98
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
99
99
elif cmd_exists wget; then ech " Using: wget (file download)" ; fdown=1
@@ -134,10 +134,10 @@ check_sdl() {
134
134
if ! cmd_exists sdl2-config || [[ $FORCE -eq 1 ]]; then
135
135
ech " SDL library not found. Installing SDL..."
136
136
if [[ " $method " == " linux" || " $method " == " darwin" ]]; then
137
- if cmd_exists apt && ! [[ " $ostype " == " darwin" * ]]; then ech " Using: apt"
138
- sudo apt install libsdl2-dev
139
- elif cmd_exists brew; then ech " Using: brew"
137
+ if cmd_exists brew; then ech " Using: brew"
140
138
brew install sdl2
139
+ elif cmd_exists apt && ! [[ " $ostype " == " darwin" * ]]; then ech " Using: apt"
140
+ sudo apt install libsdl2-dev
141
141
else
142
142
echwarn " brew, apt not found."
143
143
ech " Using: git (manual)"
@@ -181,10 +181,11 @@ check_ffmpeg() {
181
181
if ! cmd_exists $FFMPEG || ! cmd_exists $FFPLAY || [[ $FORCE -eq 1 ]]; then
182
182
ech " Installing ffmpeg and ffplay..."
183
183
check_sdl
184
- if cmd_exists apt; then ech " Using: apt"
185
- sudo apt install ffmpeg
186
- elif cmd_exists brew; then ech " Using: brew"
184
+
185
+ if cmd_exists brew; then ech " Using: brew"
187
186
brew install ffmpeg
187
+ elif cmd_exists apt; then ech " Using: apt"
188
+ sudo apt install ffmpeg
188
189
else
189
190
ech " Using: git (manual)"
190
191
ech " Compiling and installing ffmpeg..."
0 commit comments