blob: 33cf08b304a032785132548dda7de0e0bfdd51e7 (
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
|
#!/bin/bash
set -ex
cd ..
## Use sha (master@5cc1f1d) to download a particular commit to avoid breakages
## introduced by MediaWiki core
if [[ "$MW" == *@* ]]
then
arrMw=(${MW//@/ })
MW=${arrMw[0]}
SOURCE=${arrMw[1]}
else
MW=$MW
SOURCE=$MW
fi
wget https://github.com/wikimedia/mediawiki/archive/$SOURCE.tar.gz -O $MW.tar.gz
tar -zxf $MW.tar.gz
mv mediawiki-* mw
cd mw
## MW 1.25 requires Psr\Logger
if [ -f composer.json ]
then
composer install
fi
if [ "$DB" == "postgres" ]
then
# See #458
sudo /etc/init.d/postgresql stop
# Travis@support: Try adding a sleep of a few seconds between starting PostgreSQL
# and the first command that accesses PostgreSQL
sleep 3
sudo /etc/init.d/postgresql start
sleep 3
psql -c 'create database its_a_mw;' -U postgres
php maintenance/install.php --dbtype $DB --dbuser postgres --dbname its_a_mw --pass nyan TravisWiki admin --scriptpath /TravisWiki
else
mysql -e 'create database its_a_mw;'
php maintenance/install.php --dbtype $DB --dbuser root --dbname its_a_mw --dbpath $(pwd) --pass nyan TravisWiki admin --scriptpath /TravisWiki
fi
|