From 11f5ce69bb8fb9a1bcd5d83a9d1ee522cb24ac00 Mon Sep 17 00:00:00 2001 From: Dave Johansen Date: Fri, 28 Mar 2025 12:11:26 -0600 Subject: [PATCH 1/2] Use commands that work on macOS --- scripts/activate.sh | 6 +++++- scripts/build-deps | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/activate.sh b/scripts/activate.sh index 72bd44738..116fe29ca 100755 --- a/scripts/activate.sh +++ b/scripts/activate.sh @@ -6,7 +6,11 @@ if [[ "$0" == "${BASH_SOURCE[0]}" ]]; then exit 1 fi -export PYAV_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.."; pwd)" +if [[ "$(uname)" == "Darwin" ]]; then + export PYAV_ROOT="$(realpath -- "$(dirname -- "$(readlink -f -- "$0")")/..")" +else + export PYAV_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.."; pwd)" +fi if [[ ! "$PYAV_LIBRARY" ]]; then if [[ "$1" ]]; then diff --git a/scripts/build-deps b/scripts/build-deps index 9cc795305..4291140dd 100755 --- a/scripts/build-deps +++ b/scripts/build-deps @@ -47,7 +47,7 @@ cd "$PYAV_LIBRARY_ROOT" if [[ ! -d $PYAV_LIBRARY ]]; then url="https://ffmpeg.org/releases/$PYAV_LIBRARY.tar.gz" echo Downloading $url - wget --no-check-certificate "$url" || exit 1 + curl "$url" --output ${PYAV_LIBRARY}.tar.gz || exit 1 tar -xzf $PYAV_LIBRARY.tar.gz rm $PYAV_LIBRARY.tar.gz echo From 76d09db40e60be074b48adaae67652b24d724bb8 Mon Sep 17 00:00:00 2001 From: Dave Johansen Date: Fri, 28 Mar 2025 13:51:48 -0600 Subject: [PATCH 2/2] Change check for zsh instead of macOS --- scripts/activate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/activate.sh b/scripts/activate.sh index 116fe29ca..284d3a13e 100755 --- a/scripts/activate.sh +++ b/scripts/activate.sh @@ -6,7 +6,7 @@ if [[ "$0" == "${BASH_SOURCE[0]}" ]]; then exit 1 fi -if [[ "$(uname)" == "Darwin" ]]; then +if [[ -n "$ZSH_VERSION" ]]; then export PYAV_ROOT="$(realpath -- "$(dirname -- "$(readlink -f -- "$0")")/..")" else export PYAV_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.."; pwd)"