1 |
torben |
3191 |
#!/bin/bash |
2 |
|
|
|
3 |
|
|
# Note |
4 |
|
|
# 3 GB memory (ram+swap) MUST be available when compiling |
5 |
|
|
# This amount is plenty for working with denmark - but more may be required on larger areas |
6 |
|
|
# |
7 |
|
|
# DATADIR should have 6 GB free space for denmark |
8 |
|
|
|
9 |
|
|
|
10 |
|
|
################################### |
11 |
|
|
# Exit bash if a command fails |
12 |
|
|
set -e |
13 |
|
|
# also exit if a part of a pipe fails |
14 |
|
|
set -o pipefail |
15 |
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
######################### |
19 |
|
|
|
20 |
|
|
|
21 |
|
|
DATADIR=/home/openstreetmap |
22 |
|
|
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
if [ ! -d "$DATADIR" ] ; then |
26 |
|
|
echo DATADIR not found |
27 |
|
|
exit |
28 |
|
|
fi |
29 |
|
|
|
30 |
|
|
if [ ! -f /usr/local/bin/osrm-routed ] ; then |
31 |
|
|
echo osrm-routed not found |
32 |
|
|
exit |
33 |
|
|
fi |
34 |
|
|
|
35 |
|
|
|
36 |
|
|
cd $DATADIR |
37 |
|
|
|
38 |
|
|
osrm-routed denmark-latest.osrm |