summaryrefslogtreecommitdiff
path: root/test/poi-service/script/run
blob: 0cce19e897cb5bae6f0686e103bbc1cb60bcbdd4 (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
63
64
#!/bin/sh

# @licence app begin@
# SPDX-License-Identifier: MPL-2.0
#
# \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen
#
# \file run
#
# \brief This file is part of the Build System.
#
# \author Philippe Colliot <philippe.colliot@mpsa.com>
#
# \version 1.0
#
# This Source Code Form is subject to the terms of the
# Mozilla Public License (MPL), v. 2.0.
# If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# For further information see http://www.genivi.org/.
#
# List of changes:
# 
# <date>, <name>, <description of change>
#
# @licence end@

echo '------------------------start the proof of concept------------------------'
CURDIR=$PWD
ROOT_DIR=$CURDIR/..
BIN_DIR=$ROOT_DIR/bin
EXE_DIR=$BIN_DIR
COMPONENT_EXE_DIR=$ROOT_DIR/../../src/poi-service/bin
COMPONENT_SCRIPT_DIR=$ROOT_DIR/../../src/poi-service/script
MAIN_DATABASE=$EXE_DIR/'poi-database.db'
ADDITIONAL_DATABASE=$EXE_DIR/'poi-database-additional.db'

echo 'kill orphan process if necessary'
$CURDIR/kill-all

echo 'run'

if [ ! -f $COMPONENT_EXE_DIR/poi-server ]
then
	echo 'no poi-server, do ./build.sh first'
	exit
fi

if [ ! -f $MAIN_DATABASE ]
then
	echo 'no database available, do ./prepare <name of city> first'
	exit
fi

read language <$EXE_DIR/language.txt
echo $language
cd $EXE_DIR/poi-contentaccess-module/
./poi-contentaccess-module -f $ADDITIONAL_DATABASE -i $language &
cd $COMPONENT_EXE_DIR/
./poi-server -f $MAIN_DATABASE &
cd $EXE_DIR/poi-client/
./poi-client &