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
21aaf5d9
Commit
21aaf5d9
authored
15 years ago
by
Adam Vandenberg
Browse files
Options
Downloads
Patches
Plain Diff
Move brew doctor to its own source file; will get bigger.
parent
dc30e941
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/brew.h.rb
+0
-49
0 additions, 49 deletions
Library/Homebrew/brew.h.rb
Library/Homebrew/brew_doctor.rb
+48
-0
48 additions, 0 deletions
Library/Homebrew/brew_doctor.rb
bin/brew
+1
-0
1 addition, 0 deletions
bin/brew
with
49 additions
and
49 deletions
Library/Homebrew/brew.h.rb
+
0
−
49
View file @
21aaf5d9
...
...
@@ -25,55 +25,6 @@ Mercurial can be install thusly:
end
end
def
brew_doctor
read
,
write
=
IO
.
pipe
if
fork
==
nil
read
.
close
$stdout
.
reopen
write
bad_dylibs
=
Dir
[
'/usr/local/lib/*.dylib'
].
select
{
|
f
|
File
.
file?
f
and
not
File
.
symlink?
f
}
if
bad_dylibs
.
count
>
0
puts
"You have unbrewed dylibs in /usr/local/lib. These could cause build problems"
puts
"when building Homebrew formula. If you no longer need them, delete them:"
puts
puts
*
bad_dylibs
.
collect
{
|
f
|
"
#{
f
}
"
}
puts
end
if
gcc_build
<
HOMEBREW_RECOMMENDED_GCC
puts
"Your GCC version is older than the recommended version. It may be advisable"
puts
"to upgrade to the latest release of Xcode."
puts
end
if
macports_or_fink_installed?
puts
"You have Macports or Fink installed. This can cause trouble."
puts
"You don't have to uninstall them, but you may like to try temporarily"
puts
"moving them away, eg."
puts
puts
" sudo mv /opt/local ~/macports"
puts
end
unless
File
.
exists?
'/usr/X11/lib/libpng.dylib'
puts
"You don't have X11 installed as part of your Xcode installation."
puts
"This isn't required for all formula. But it is expected by some."
end
exit!
0
else
write
.
close
unless
(
out
=
read
.
read
).
chomp
.
empty?
puts
out
else
puts
"Your OS X is ripe for brewing. Any troubles you may be experiencing are"
puts
"likely purely psychosomatic."
end
end
end
def
__make
url
,
name
require
'formula'
require
'digest'
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/brew_doctor.rb
0 → 100644
+
48
−
0
View file @
21aaf5d9
def
brew_doctor
read
,
write
=
IO
.
pipe
if
fork
==
nil
read
.
close
$stdout
.
reopen
write
bad_dylibs
=
Dir
[
'/usr/local/lib/*.dylib'
].
select
{
|
f
|
File
.
file?
f
and
not
File
.
symlink?
f
}
if
bad_dylibs
.
count
>
0
puts
"You have unbrewed dylibs in /usr/local/lib. These could cause build problems"
puts
"when building Homebrew formula. If you no longer need them, delete them:"
puts
puts
*
bad_dylibs
.
collect
{
|
f
|
"
#{
f
}
"
}
puts
end
if
gcc_build
<
HOMEBREW_RECOMMENDED_GCC
puts
"Your GCC version is older than the recommended version. It may be advisable"
puts
"to upgrade to the latest release of Xcode."
puts
end
if
macports_or_fink_installed?
puts
"You have Macports or Fink installed. This can cause trouble."
puts
"You don't have to uninstall them, but you may like to try temporarily"
puts
"moving them away, eg."
puts
puts
" sudo mv /opt/local ~/macports"
puts
end
unless
File
.
exists?
'/usr/X11/lib/libpng.dylib'
puts
"You don't have X11 installed as part of your Xcode installation."
puts
"This isn't required for all formula. But it is expected by some."
end
exit!
0
else
write
.
close
unless
(
out
=
read
.
read
).
chomp
.
empty?
puts
out
else
puts
"Your OS X is ripe for brewing. Any troubles you may be experiencing are"
puts
"likely purely psychosomatic."
end
end
end
This diff is collapsed.
Click to expand it.
bin/brew
+
1
−
0
View file @
21aaf5d9
...
...
@@ -366,6 +366,7 @@ begin
onoe "Unknown command:
#{
arg
}
(did you mean 'git
#{
arg
}
'?)"
when 'doctor'
require 'brew_doctor'
brew_doctor
else
...
...
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