You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
928 B

  1. #!/usr/bin/env bash
  2. # for all source tarballs and their coresponding md5 files, build a binary release tarball
  3. system=$(uname -s|tr [:upper:] [:lower:])
  4. arch=$(uname -m)
  5. function expand() {
  6. echo $* | tr ,: " "
  7. }
  8. for f in *.md5; do
  9. if [[ $f =~ (.*).tar.gz.md5 ]] ; then
  10. mysqlsrc=${BASH_REMATCH[1]}
  11. else
  12. exit 1
  13. fi
  14. if [ -d $mysqlsrc ] ; then continue; fi
  15. md5sum --check $mysqlsrc.tar.gz.md5
  16. if [ $? != 0 ] ; then exit 1; fi
  17. tar xzf $mysqlsrc.tar.gz
  18. if [ $? != 0 ] ; then exit 1; fi
  19. mkdir $mysqlsrc/build.RelWithDebInfo
  20. pushd $mysqlsrc/build.RelWithDebInfo
  21. if [ $? != 0 ] ; then exit 1; fi
  22. cmake -D BUILD_CONFIG=mysql_release -D CMAKE_BUILD_TYPE=RelWithDebInfo -D BUILD_TESTING=OFF ..
  23. if [ $? != 0 ] ; then exit 1; fi
  24. make -j4 package
  25. if [ $? != 0 ] ; then exit 1; fi
  26. if [ ! -f $mysqlsrc-$system-$arch.tar.gz ] ; then exit 1; fi
  27. popd
  28. done