Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
2f4eaf26
Commit
2f4eaf26
authored
7 years ago
by
Tim D. Smith
Browse files
Options
Downloads
Patches
Plain Diff
Use extend/OS mechanism for grep args
parent
d0feae06
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Library/Homebrew/extend/os/mac/keg_relocate.rb
+6
-0
6 additions, 0 deletions
Library/Homebrew/extend/os/mac/keg_relocate.rb
Library/Homebrew/keg_relocate.rb
+7
-6
7 additions, 6 deletions
Library/Homebrew/keg_relocate.rb
with
13 additions
and
6 deletions
Library/Homebrew/extend/os/mac/keg_relocate.rb
+
6
−
0
View file @
2f4eaf26
...
...
@@ -131,6 +131,12 @@ class Keg
mach_o_files
end
def
recursive_fgrep_args
# Don't recurse into symlinks; the man page says this is the default, but
# it's wrong. -O is a BSD-grep-only option.
"-lrO"
end
def
self
.
file_linked_libraries
(
file
,
string
)
# Check dynamic library linkage. Importantly, do not perform for static
# libraries, which will falsely report "linkage" to themselves.
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/keg_relocate.rb
+
7
−
6
View file @
2f4eaf26
...
...
@@ -98,13 +98,14 @@ class Keg
[]
end
def
recursive_fgrep_args
# for GNU grep; overridden for BSD grep on OS X
"-lr"
end
alias
generic_recursive_fgrep_args
recursive_fgrep_args
def
each_unique_file_matching
(
string
)
bsd
=
`/usr/bin/fgrep -V`
.
include?
(
"BSD grep"
)
grep_args
=
"-lr"
# Don't recurse into symlinks; the man page says this is the default, but
# it's wrong.
grep_args
+=
"O"
if
bsd
Utils
.
popen_read
(
"/usr/bin/fgrep"
,
grep_args
,
string
,
to_s
)
do
|
io
|
Utils
.
popen_read
(
"/usr/bin/fgrep"
,
recursive_fgrep_args
,
string
,
to_s
)
do
|
io
|
hardlinks
=
Set
.
new
until
io
.
eof?
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment