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
fe29cc29
Commit
fe29cc29
authored
8 years ago
by
Mike McQuaid
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
cleaner: port to generic OS. (#447)
parent
883b201c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Library/Homebrew/cleaner.rb
+7
-1
7 additions, 1 deletion
Library/Homebrew/cleaner.rb
Library/Homebrew/extend/os/cleaner.rb
+5
-0
5 additions, 0 deletions
Library/Homebrew/extend/os/cleaner.rb
Library/Homebrew/extend/os/mac/cleaner.rb
+7
-0
7 additions, 0 deletions
Library/Homebrew/extend/os/mac/cleaner.rb
with
19 additions
and
1 deletion
Library/Homebrew/cleaner.rb
+
7
−
1
View file @
fe29cc29
...
@@ -66,6 +66,10 @@ class Cleaner
...
@@ -66,6 +66,10 @@ class Cleaner
end
end
end
end
def
executable_path?
(
path
)
path
.
text_executable?
end
# Clean a top-level (bin, sbin, lib) directory, recursively, by fixing file
# Clean a top-level (bin, sbin, lib) directory, recursively, by fixing file
# permissions and removing .la files, unless the files (or parent
# permissions and removing .la files, unless the files (or parent
# directories) are protected by skip_clean.
# directories) are protected by skip_clean.
...
@@ -87,7 +91,7 @@ class Cleaner
...
@@ -87,7 +91,7 @@ class Cleaner
path
.
unlink
path
.
unlink
else
else
# Set permissions for executables and non-executables
# Set permissions for executables and non-executables
perms
=
if
path
.
mach_o_executable?
||
path
.
text_executable?
perms
=
if
executable_path?
(
path
)
0555
0555
else
else
0444
0444
...
@@ -103,3 +107,5 @@ class Cleaner
...
@@ -103,3 +107,5 @@ class Cleaner
end
end
end
end
end
end
require
"extend/os/cleaner"
This diff is collapsed.
Click to expand it.
Library/Homebrew/extend/os/cleaner.rb
0 → 100644
+
5
−
0
View file @
fe29cc29
require
"cleaner"
if
OS
.
mac?
require
"extend/os/mac/cleaner"
end
This diff is collapsed.
Click to expand it.
Library/Homebrew/extend/os/mac/cleaner.rb
0 → 100644
+
7
−
0
View file @
fe29cc29
class
Cleaner
private
def
executable_path?
(
path
)
path
.
mach_o_executable?
||
path
.
text_executable?
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