Skip to content

Commit

Permalink
Yeet.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Sep 2, 2024
1 parent 0161a5a commit 343b79c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions brew-pkg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ def patchelf(root_dir, prefix_path, binary)

# Iterate through all libraries that the binary is linked to
lib_paths.each do |lib|
lib_path = File.realpath(File.join(root_dir, lib))

ohai "Check if file exists (#{lib_path}) #{lib_path} : #{File.exist?(lib_path)}"
system("ls", "-la", lib)
system("ls", "-la", lib_path)
lib_path = (File.realpath(File.join(root_dir, lib)) rescue nil)

if File.exist?(lib_path)
ohai "Check if file exists (#{lib}) #{lib_path} : #{File.exist?(lib_path)}"
system("ls", "-la", lib)
system("ls", "-la", lib_path)

# Obtain the relative path from the executable
relative_path = Pathname.new(lib_path).relative_path_from(Pathname.new(binary_path))
new_lib = File.join('@executable_path', relative_path)
Expand Down

0 comments on commit 343b79c

Please sign in to comment.