diff options
| author | Mike McQuaid | 2014-03-02 02:16:13 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-03-03 12:31:25 +0000 |
| commit | ac48feb6ba7d090d4212777a117c756f1f7eb1d2 (patch) | |
| tree | 0e6f6a8e8876e2c9d8cb7e2d0c30a834b98a2d97 /Library/Homebrew/keg_fix_install_names.rb | |
| parent | 052aadb14b0e42ab942040a0dc7f3a20c5c8b4d8 (diff) | |
| download | homebrew-ac48feb6ba7d090d4212777a117c756f1f7eb1d2.tar.bz2 | |
keg_fix_install_names: gsub shebangd bottle files.
Closes #27126.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/keg_fix_install_names.rb')
| -rw-r--r-- | Library/Homebrew/keg_fix_install_names.rb | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/Library/Homebrew/keg_fix_install_names.rb b/Library/Homebrew/keg_fix_install_names.rb index cdbab97a9..51f84b148 100644 --- a/Library/Homebrew/keg_fix_install_names.rb +++ b/Library/Homebrew/keg_fix_install_names.rb @@ -38,7 +38,7 @@ class Keg end end - (pkgconfig_files | libtool_files).each do |file| + (pkgconfig_files | libtool_files | script_files).each do |file| file.ensure_writable do file.open('rb') do |f| s = f.read @@ -157,6 +157,18 @@ class Keg mach_o_files end + def script_files + script_files = [] + + # find all files with shebangs + Pathname.new(self).find do |pn| + next if pn.symlink? or pn.directory? + script_files << pn if pn.text_executable? + end + + script_files + end + def pkgconfig_files pkgconfig_files = [] @@ -169,11 +181,6 @@ class Keg end end - # find name-config scripts, which can be all over the keg - Pathname.new(self).find do |pn| - next if pn.symlink? or pn.directory? - pkgconfig_files << pn if pn.basename.to_s.end_with? '-config' and pn.text_executable? - end pkgconfig_files end |
