From 9da2d4d7a90f7a0bfa41d40fa180e1d63a07ace8 Mon Sep 17 00:00:00 2001 From: Levon Gevorgyan Date: Sat, 26 Apr 2025 12:12:43 -0500 Subject: [PATCH] small macos fixes --- scripts/build.sh | 8 ++------ scripts/install_deps.sh | 7 ++++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index fa1d06d..b28127b 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -261,9 +261,7 @@ build_hdr10plus_tool() { # build libhdr10plus cd hdr10plus || return 1 ccache cargo cbuild --release - rm -rf build.user - cargo cinstall --prefix=build.user --release || return 1 - ${SUDO} cp -r build.user/* "${PREFIX}/" + ${SUDO} bash -lc "cargo cinstall --prefix=${PREFIX} --release" || return 1 } build_dovi_tool() { @@ -275,9 +273,7 @@ build_dovi_tool() { # build libdovi cd dolby_vision || return 1 ccache cargo cbuild --release - rm -rf build.user - cargo cinstall --prefix=build.user --release || return 1 - ${SUDO} cp -r build.user/* "${PREFIX}/" + ${SUDO} bash -lc "cargo cinstall --prefix=${PREFIX} --release" || return 1 } build_libsvtav1_psy() { diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh index 66354da..af2f987 100644 --- a/scripts/install_deps.sh +++ b/scripts/install_deps.sh @@ -13,7 +13,7 @@ determine_darwin_pkg_mgr() { fi PKG_MGR=brew check_pkg_exists() { - "${PKG_MGR}" list "${1}" + "${PKG_MGR}" list --formula "${1}" >/dev/null } PKG_MGR_UPD="${PKG_MGR} update" PKG_MGR_INST="${PKG_MGR} install" @@ -106,7 +106,8 @@ check_for_req_pkgs() { ) # shellcheck disable=SC2034 local brew_pkgs=( - "${common_pkgs[@]}" pkgconf mkvtoolnix + "${common_pkgs[@]}" pkgconf + mkvtoolnix pipx ) local common_linux_pkgs=( "${common_pkgs[@]}" clang valgrind @@ -134,7 +135,7 @@ check_for_req_pkgs() { pipx ninja-build ) - if test "${TARGET_WINDOWS}" -eq 1; then + if [[ "${TARGET_WINDOWS}" -eq 1 ]]; then apt_get_pkgs+=(gcc-mingw-w64 g++-mingw-w64) fi