Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
ruby-build
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ruby-build
Commits
c0a2d90c
Commit
c0a2d90c
authored
Dec 30, 2011
by
Sam Stephenson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Look for gcc-* anywhere in $PATH. Fixes #109
parent
8e6e2372
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
bin/ruby-build
+17
-3
No files found.
bin/ruby-build
View file @
c0a2d90c
...
@@ -252,9 +252,7 @@ require_gcc() {
...
@@ -252,9 +252,7 @@ require_gcc() {
locate_gcc
()
{
locate_gcc
()
{
local
gcc gccs
local
gcc gccs
shopt
-s
nullglob
IFS
=
:
gccs
=(
$(
gccs_in_path
)
)
gccs
=(
/usr/bin/gcc-
*
)
shopt
-u
nullglob
verify_gcc
"
$CC
"
||
verify_gcc
"
$CC
"
||
verify_gcc
"
$(
command
-v
gcc
||
true
)
"
||
{
verify_gcc
"
$(
command
-v
gcc
||
true
)
"
||
{
...
@@ -266,6 +264,22 @@ locate_gcc() {
...
@@ -266,6 +264,22 @@ locate_gcc() {
return
1
return
1
}
}
gccs_in_path
()
{
local
gcc path paths
local
gccs
=()
IFS
=
:
paths
=(
$PATH
)
shopt
-s
nullglob
for
path
in
"
${
paths
[@]
}
"
;
do
for
gcc
in
"
$path
"
/gcc-
*
;
do
gccs[
"
${#
gccs
[@]
}
"
]=
"
$gcc
"
done
done
shopt
-u
nullglob
printf
:%s
"
${
gccs
[@]
}
"
}
verify_gcc
()
{
verify_gcc
()
{
local
gcc
=
"
$1
"
local
gcc
=
"
$1
"
if
[
-z
"
$gcc
"
]
;
then
if
[
-z
"
$gcc
"
]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment