summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorrich prohaska <prohaska@tokutek.com>2013-05-24 11:01:40 -0400
committerRich Prohaska <prohaska@tokutek.com>2013-05-24 11:01:40 -0400
commit8a2ca75d39e56aa76f119cc7ce5570ea7f149ac4 (patch)
tree5adcb0875f308c788c87f4f0287548815bd6b0d0 /scripts
parent883e96b6850c0fe620b4e515b0cdff23e0eb86b7 (diff)
downloadmariadb-git-8a2ca75d39e56aa76f119cc7ce5570ea7f149ac4.tar.gz
#31 exit nicely when git ls-remote fails
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/make.mysql.bash18
1 files changed, 14 insertions, 4 deletions
diff --git a/scripts/make.mysql.bash b/scripts/make.mysql.bash
index db5b93bd567..5be303fc0ea 100755
--- a/scripts/make.mysql.bash
+++ b/scripts/make.mysql.bash
@@ -140,7 +140,13 @@ fi
# prints a cmake command to eval
function generate_cmake_cmd () {
- local ft_revision=0x$(git ls-remote https://github.com/Tokutek/ft-index.git $git_tag | cut -c-7)
+ local ls_remote # dont combine this with the following line
+ ls_remote=$(git ls-remote https://github.com/Tokutek/ft-index.git $git_tag)
+ if [ $? != 0 ] ; then
+ echo 1>&2 "git ls-remote https://github.com/Tokutek/ft-index.git $git_tag failed $?"
+ test 0 = 1; return
+ fi
+ local ft_revision=0x$(echo $ls_remote | cut -c-7)
echo -n CC=$cc CXX=$cxx cmake \
-D BUILD_CONFIG=mysql_release \
@@ -193,7 +199,7 @@ function generate_cmake_cmd_rpm() {
echo -n " " -D RPM=$linux_distro
elif [ $system = linux -a $mysql_distro != mariadb ] ; then
echo 1>&2 "I don't know how to build rpms for mysql yet."
- exit 1
+ test 0 = 1; return
fi
}
@@ -204,7 +210,9 @@ if [ $build_tgz != 0 ] ; then
pushd build.$cmake_build_type
# actually build
- eval $(generate_cmake_cmd) ..
+ cmd=$(generate_cmake_cmd)
+ if [ $? != 0 ] ; then exit 1; fi
+ eval $cmd ..
if [ $package_source_done = 0 ] ; then
make package_source
package_source_done=1
@@ -219,7 +227,9 @@ if [ $build_rpm != 0 ] ; then
pushd build.rpm.$cmake_build_type
# actually build
- eval $(generate_cmake_cmd; generate_cmake_cmd_rpm) ..
+ cmd=$(generate_cmake_cmd; generate_cmake_cmd_rpm)
+ if [ $? != 0 ] ; then exit 1; fi
+ eval $cmd ..
if [ $package_source_done = 0 ] ; then
make package_source
package_source_done=1