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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c276ee49
Commit
c276ee49
authored
Apr 28, 2013
by
Leif Walsh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#10 misc fixes to new build script
parent
e25b127d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
5 deletions
+41
-5
scripts/common.sh
scripts/common.sh
+37
-0
scripts/make.mysql.new.bash
scripts/make.mysql.new.bash
+4
-5
No files found.
scripts/common.sh
View file @
c276ee49
function
retry
()
{
set
+e
local
cmd
local
retries
local
exitcode
cmd
=
$*
let
retries
=
0
while
[
$retries
-le
10
]
;
do
echo
`
date
`
$cmd
bash
-c
"
$cmd
"
exitcode
=
$?
echo
`
date
`
$cmd
$exitcode
$retries
let
retries
=
retries+1
if
[
$exitcode
-eq
0
]
;
then
break
;
fi
sleep
10
done
set
-e
test
$exitcode
=
0
}
github_use_ssh
=
0
github_token
=
github_user
=
function
github_download
()
{
function
github_download
()
{
repo
=
$1
;
shift
repo
=
$1
;
shift
rev
=
$1
;
shift
rev
=
$1
;
shift
...
@@ -63,6 +87,19 @@ function github_download() {
...
@@ -63,6 +87,19 @@ function github_download() {
fi
fi
}
}
# returns b if b is defined else returns a
function
git_tree
()
{
set
+u
local
a
=
$1
;
shift
local
b
=
$1
;
shift
if
[
!
-z
$b
]
;
then
echo
$b
else
echo
$a
;
fi
set
-u
}
# compute the number of cpus in this system. used to parallelize the build.
# compute the number of cpus in this system. used to parallelize the build.
function
get_ncpus
()
{
function
get_ncpus
()
{
if
[
-f
/proc/cpuinfo
]
;
then
if
[
-f
/proc/cpuinfo
]
;
then
...
...
scripts/make.mysql.new.bash
View file @
c276ee49
...
@@ -13,7 +13,6 @@ system=$(uname -s | tr '[:upper:]' '[:lower:]')
...
@@ -13,7 +13,6 @@ system=$(uname -s | tr '[:upper:]' '[:lower:]')
arch
=
$(
uname
-m
|
tr
'[:upper:]'
'[:lower:]'
)
arch
=
$(
uname
-m
|
tr
'[:upper:]'
'[:lower:]'
)
makejobs
=
$(
get_ncpus
)
makejobs
=
$(
get_ncpus
)
github_use_ssh
=
0
git_tag
=
HEAD
git_tag
=
HEAD
mysqlbuild
=
mysqlbuild
=
mysql
=
mysql-5.5.30
mysql
=
mysql-5.5.30
...
@@ -110,9 +109,9 @@ if [ ! -d storage/tokudb/ft-index/third_party/jemalloc ] ; then
...
@@ -110,9 +109,9 @@ if [ ! -d storage/tokudb/ft-index/third_party/jemalloc ] ; then
fi
fi
# append tokudb-specific version
# append tokudb-specific version
if
grep
-qv
tokudb VERSION
;
then
if
[
$(
fgrep tokudb VERSION |
wc
-l
)
=
0
]
;
then
# append the tokudb version to the MYSQL_VERSION_EXTRA variable in the VERSION file
# append the tokudb version to the MYSQL_VERSION_EXTRA variable in the VERSION file
sed
-
i
""
-e
"s/^MYSQL_VERSION_EXTRA=.*/&-tokudb-
${
tokudb_version
}
/"
VERSION
sed
-
-in-place
=
""
-e
"s/^MYSQL_VERSION_EXTRA=.*/&-tokudb-
${
tokudb_version
}
/"
VERSION
fi
fi
# prints a cmake command to eval
# prints a cmake command to eval
...
@@ -159,10 +158,10 @@ function generate_cmake_cmd () {
...
@@ -159,10 +158,10 @@ function generate_cmake_cmd () {
linux_distro
=
linux
linux_distro
=
linux
if
[
-f
/etc/issue
]
;
then
if
[
-f
/etc/issue
]
;
then
if
[[
"
$(
head
-1
/etc/issue
)
"
=
~
"Red Hat Enterprise Linux Server release ([56])"
]]
;
then
if
[[
"
$(
head
-1
/etc/issue
)
"
=
~
"Red Hat Enterprise Linux Server release ([56])"
]]
;
then
linux_distro
=
rhel
${
BASH_REMATCH
[1]
)
linux_distro
=
rhel
${
BASH_REMATCH
[1]
}
fi
fi
if
[[
"
$(
head
-1
/etc/issue
)
"
=
~
"CentOS release ([56])"
]]
;
then
if
[[
"
$(
head
-1
/etc/issue
)
"
=
~
"CentOS release ([56])"
]]
;
then
linux_distro=centos
${
BASH_REMATCH
[1]
)
linux_distro
=
centos
${
BASH_REMATCH
[1]
}
fi
fi
fi
fi
echo
-n
" "
-D
RPM
=
$linux_distro
echo
-n
" "
-D
RPM
=
$linux_distro
...
...
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