Skip to content

Commit

Permalink
General /usr/lib exclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacMarovitz committed Apr 7, 2024
1 parent 3e4d037 commit da0c740
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,11 @@ jobs:
local dylib_file="$1"
echo "Processing $dylib_file..."
# Define exclusions
local system_dylib="/usr/lib/libSystem.B.dylib"
local objc_dylib="/usr/lib/libobjc.A.dylib"
# Extract LC_LOAD_DYLIB paths using otool
local load_dylibs=$(otool -L "$dylib_file" | grep -v "$dylib_file" | awk '{print $1}')
for path in $load_dylibs; do
if [[ $path != $system_dylib && $path != $objc_dylib && $path != /System/* ]]; then
if [[ $path != /usr/lib* && $path != /System/* ]]; then
# For paths not excluded, replace the prefix with @loader_path/
local lib_name="${path##*/}"
local new_path="@loader_path/${lib_name}"
Expand All @@ -369,15 +365,11 @@ jobs:
local dylib_file="$1"
echo "Processing $dylib_file..."
# Define exclusions
local system_dylib="/usr/lib/libSystem.B.dylib"
local objc_dylib="/usr/lib/libobjc.A.dylib"
# Extract LC_LOAD_DYLIB paths using otool
local load_dylibs=$(otool -L "$dylib_file" | grep -v "$dylib_file" | awk '{print $1}')
for path in $load_dylibs; do
if [[ $path != $system_dylib && $path != $objc_dylib && $path != /System/* ]]; then
if [[ $path != /usr/lib* && $path != /System/* ]]; then
# For paths not excluded, replace the prefix with @loader_path/
local lib_name="${path##*/}"
local new_path="@loader_path/../${lib_name}"
Expand Down

0 comments on commit da0c740

Please sign in to comment.