1
0

before_install.sh 940 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. #
  3. # ownCloud
  4. #
  5. # @author Thomas Müller
  6. # @copyright 2014 Thomas Müller thomas.mueller@tmit.eu
  7. #
  8. set -e
  9. WORKDIR=$PWD
  10. DB=$1
  11. echo "Work directory: $WORKDIR"
  12. echo "Database: $DB"
  13. if [ "$DB" == "mysql" ] ; then
  14. echo "Setting up mysql ..."
  15. mysql -e 'create database oc_autotest;'
  16. mysql -u root -e "CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY 'owncloud'";
  17. mysql -u root -e "grant all on oc_autotest.* to 'oc_autotest'@'localhost'";
  18. mysql -e "SELECT User FROM mysql.user;"
  19. fi
  20. if [ "$DB" == "pgsql" ] ; then
  21. createuser -U travis -s oc_autotest
  22. fi
  23. #if [ "$DB" == "oracle" ] ; then
  24. # if [ ! -f before_install_oracle.sh ]; then
  25. # wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install_oracle.sh
  26. # fi
  27. # bash ./before_install_oracle.sh
  28. #fi
  29. #
  30. # copy custom php.ini settings
  31. #
  32. if [ $(phpenv version-name) != 'hhvm' ]; then
  33. phpenv config-add tests/travis/custom.ini
  34. fi