Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
13870542
Commit
13870542
authored
May 29, 2013
by
rich prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get the build script get_ncpus function to work on more systems
parent
b7b688de
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
scripts/common.sh
scripts/common.sh
+10
-5
No files found.
scripts/common.sh
View file @
13870542
...
...
@@ -102,12 +102,17 @@ function git_tree() {
# compute the number of cpus in this system. used to parallelize the build.
function
get_ncpus
()
{
if
[
-f
/proc/cpuinfo
]
;
the
n
grep
bogomips /proc/cpuinfo |
wc
-l
elif
[
$system
=
darwin
]
;
then
sysctl
-n
hw.ncpu
local
n
n
=
$(
grep
processor /proc/cpuinfo 2>/dev/null
)
if
[
$?
=
0
]
;
then
echo
"
$n
"
|
wc
-l
else
echo
1
n
=
$(
sysctl
-n
hw.ncpu 2>/dev/null
)
if
[
$?
=
0
]
;
then
echo
$n
else
echo
1
# default is 1 cpu
fi
fi
}
...
...
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