Skip to content

Commit

Permalink
MacOS System detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Perl committed Nov 26, 2024
1 parent 3014b61 commit 6ad4204
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
build-macos:
name: build in native macOS
runs-on: macos-latest
runs-on: macos-15
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
17 changes: 9 additions & 8 deletions build-ffmpeg
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ LATEST=false
MANPAGES=1
CURRENT_PACKAGE_VERSION=0


command_exists() {
if ! [[ -x $(command -v "$1") ]]; then
return 1
fi

return 0
}

# Check for Apple Silicon
if [[ ("$(uname -m)" == "arm64") && ("$OSTYPE" == "darwin"*) ]]; then
# If arm64 AND darwin (macOS)
Expand Down Expand Up @@ -179,14 +188,6 @@ build() {
return 0
}

command_exists() {
if ! [[ -x $(command -v "$1") ]]; then
return 1
fi

return 0
}

library_exists() {
if ! [[ -x $(pkg-config --exists --print-errors "$1" 2>&1 >/dev/null) ]]; then
return 1
Expand Down

0 comments on commit 6ad4204

Please sign in to comment.