2014-06-28 02:08:57 +08:00
|
|
|
#!/bin/bash -x
|
2014-06-27 19:19:58 +08:00
|
|
|
|
|
|
|
set -e
|
|
|
|
set -o pipefail
|
2014-06-28 02:08:57 +08:00
|
|
|
set -x
|
2014-06-27 19:19:58 +08:00
|
|
|
|
|
|
|
with_timestamps() {
|
|
|
|
while read -r line; do
|
|
|
|
echo -e "$(date +%T)\t$line";
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bootstrap_zm() {
|
|
|
|
|
2014-06-27 20:34:15 +08:00
|
|
|
cd $TRAVIS_BUILD_DIR
|
|
|
|
|
2014-06-27 19:19:58 +08:00
|
|
|
if [ "$ZM_BUILDMETHOD" = "autotools" ]; then libtoolize --force; fi
|
|
|
|
if [ "$ZM_BUILDMETHOD" = "autotools" ]; then aclocal; fi
|
|
|
|
if [ "$ZM_BUILDMETHOD" = "autotools" ]; then autoheader; fi
|
|
|
|
if [ "$ZM_BUILDMETHOD" = "autotools" ]; then automake --force-missing --add-missing; fi
|
|
|
|
if [ "$ZM_BUILDMETHOD" = "autotools" ]; then autoconf; fi
|
|
|
|
|
|
|
|
mysql -uroot -e "CREATE DATABASE IF NOT EXISTS zm"
|
|
|
|
mysql -uroot -e "GRANT ALL ON zm.* TO 'zmuser'@'localhost' IDENTIFIED BY 'zmpass'";
|
|
|
|
mysql -uroot -e "FLUSH PRIVILEGES"
|
|
|
|
mysql -uzmuser -pzmpass < db/zm_create.sql
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
bootstrap_zm | with_timestamps
|