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
6d0f0cb1
Commit
6d0f0cb1
authored
10 years ago
by
Jack Nagel
Browse files
Options
Downloads
Patches
Plain Diff
metafiles: simplify #copy? further
parent
07257f2f
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/pathname.rb
+1
-1
1 addition, 1 deletion
Library/Homebrew/extend/pathname.rb
Library/Homebrew/metafiles.rb
+5
-11
5 additions, 11 deletions
Library/Homebrew/metafiles.rb
with
6 additions
and
12 deletions
Library/Homebrew/extend/pathname.rb
+
1
−
1
View file @
6d0f0cb1
...
...
@@ -378,7 +378,7 @@ class Pathname
def
install_metafiles
from
=
Pathname
.
pwd
Pathname
(
from
).
children
.
each
do
|
p
|
next
if
p
.
directory?
next
unless
Metafiles
.
copy?
(
p
)
next
unless
Metafiles
.
copy?
(
p
.
basename
.
to_s
)
# Some software symlinks these files (see help2man.rb)
filename
=
p
.
resolved_path
# Some software links metafiles together, so by the time we iterate to one of them
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/metafiles.rb
+
5
−
11
View file @
6d0f0cb1
...
...
@@ -10,16 +10,10 @@ class Metafiles
!
copy?
(
file
)
end
def
self
.
copy?
(
path
)
path
=
path
.
to_s
.
downcase
ext
=
File
.
extname
(
path
)
if
EXTENSIONS
.
include?
(
ext
)
basename
=
File
.
basename
(
path
,
ext
)
else
basename
=
File
.
basename
(
path
)
end
return
BASENAMES
.
include?
(
basename
)
def
self
.
copy?
(
file
)
file
=
file
.
downcase
ext
=
File
.
extname
(
file
)
file
=
File
.
basename
(
file
,
ext
)
if
EXTENSIONS
.
include?
(
ext
)
BASENAMES
.
include?
(
file
)
end
end
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