From 94735192ebb419dae2be56d4ee0fd4189d7ec16e Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Wed, 13 Sep 2023 11:27:45 +0200 Subject: [PATCH] install-common-deps.sh: do not require GITHUB_WORKSPACE allows running the script alone to replicate the build env --- .github/scripts/install-common-deps.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/scripts/install-common-deps.sh b/.github/scripts/install-common-deps.sh index d02292d97..ec690c849 100755 --- a/.github/scripts/install-common-deps.sh +++ b/.github/scripts/install-common-deps.sh @@ -1,5 +1,8 @@ #!/bin/sh -eux +curdir=$(cd "$(dirname "$0")"; pwd) +readonly curdir + win=no case "$(uname -s)" in CYGWIN*|MINGW32*|MSYS*|MINGW*) @@ -21,10 +24,9 @@ is_arm() { expr "$(dpkg --print-architecture)" : arm >/dev/null; } # for Win only download here, compilation is handled differently download_install_cineform() {( - cd "$GITHUB_WORKSPACE" git clone --depth 1 https://github.com/gopro/cineform-sdk cd cineform-sdk - git apply "$GITHUB_WORKSPACE/.github/scripts/0001-CMakeList.txt-remove-output-lib-name-force-UNIX.patch" + git apply "$curdir/0001-CMakeList.txt-remove-output-lib-name-force-UNIX.patch" mkdir build && cd build if [ "$win" = no ]; then cmake -DBUILD_TOOLS=OFF ..