-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·78 lines (62 loc) · 1.35 KB
/
bootstrap.sh
File metadata and controls
executable file
·78 lines (62 loc) · 1.35 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
while getopts "u" o; do
case "${o}" in
u)
update=1
;;
esac
done
shift $((OPTIND-1))
target=$1
origdir=$(pwd)
if(test -z $target)
then
cat <<EOF
Usage: ./bootstrap.sh [-u] target-dir
target-dir: directory to install into
-u: do an update only (no git clone)
EOF
exit 1
fi
if(test -z $(which git)) then
echo No git installed.
exit 1
fi
if(test -z $(which php))
then
echo No php installed.
exit 1
fi
function installMapbender {
cd $origdir
if(test -d $target)
then
echo Target directory directory exists.
exit 1
fi
git clone -b develop git://github.com/mapbender/mapbender-starter $target
cd $target
git submodule update --init --recursive
cd application
cp app/config/parameters.yml.dist app/config/parameters.yml
../composer.phar install
app/console doctrine:schema:update --force
cd $origdir
}
function updateMapbender {
cd $origdir
cd $target
cd application
../composer.phar install
app/console doctrine:schema:update --force
app/console doctrine:fixtures:load --fixtures=./mapbender/src/Mapbender/CoreBundle/DataFixtures/ORM/Epsg/ --append
app/console fom:user:resetroot --username="root" --password="root" --email="root@example.com" --silent
cd $origdir
}
if(test -z $update)
then
installMapbender
updateMapbender
else
updateMapbender
fi