diff --git a/.github/scripts/build-macos-release.sh b/.github/scripts/build-macos-release.sh index 817d8b422..3e1f1b366 100755 --- a/.github/scripts/build-macos-release.sh +++ b/.github/scripts/build-macos-release.sh @@ -1,4 +1,5 @@ -#!/bin/sh +#!/bin/bash +set -eux add_rpath() { @@ -13,7 +14,7 @@ fix_path() NEW="$3" OLD=$(otool -L "$BINARY" | grep "$MATCH" | awk '{print $1}') install_name_tool -change "$OLD" "$NEW" "$BINARY" - cp -n "$OLD" "$(dirname "$BINARY")/$(basename "$NEW")" + cp -n "$OLD" "$(dirname "$BINARY")/$(basename "$NEW")" || true } @@ -25,7 +26,6 @@ BINARY="$BUILD/echidna-test" add_rpath "$BINARY" fix_path "$BINARY" libsecp256k1 "@rpath/libsecp256k1.dylib" fix_path "$BINARY" libff "@rpath/libff.dylib" -fix_path "$BINARY" libgmp "@rpath/libgmp.dylib" fix_path "$BUILD/libff.dylib" libgmp "@rpath/libgmp.dylib" fix_path "$BUILD/libsecp256k1.dylib" libgmp "@rpath/libgmp.dylib"