blob: 6586cfaee8c85d86f5e9491016deacdbf949d28b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
#!/bin/bash
#
# ownCloud
#
# @author Thomas Müller
# @copyright 2014 Thomas Müller thomas.mueller@tmit.eu
#
set -e
WORKDIR=$PWD
APP_NAME=$1
CORE_BRANCH=$2
DB=$3
echo "Work directory: $WORKDIR"
echo "Database: $DB"
cd ..
git clone --depth 1 -b $CORE_BRANCH https://github.com/nextcloud/server
cd core
git submodule update --init
cd apps
cp -R ../../$APP_NAME/ .
cd $WORKDIR
if [ "$DB" == "mysql" ] ; then
echo "Setting up mysql ..."
mysql -e 'create database oc_autotest;'
mysql -u root -e "CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY 'owncloud'";
mysql -u root -e "grant all on oc_autotest.* to 'oc_autotest'@'localhost'";
mysql -e "SELECT User FROM mysql.user;"
fi
if [ "$DB" == "pgsql" ] ; then
createuser -U travis -s oc_autotest
fi
if [ "$DB" == "oracle" ] ; then
if [ ! -f before_install_oracle.sh ]; then
wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install_oracle.sh
fi
bash ./before_install_oracle.sh
fi
#
# copy custom php.ini settings
#
wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/custom.ini
if [ $(phpenv version-name) != 'hhvm' ]; then
phpenv config-add custom.ini
fi
#
# copy install script
#
cd ../core
if [ ! -f core_install.sh ]; then
wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/core_install.sh
fi
bash ./core_install.sh $DB
|